diff --git a/articles/models.go b/articles/models.go index f5a0ec1..657a823 100644 --- a/articles/models.go +++ b/articles/models.go @@ -2,10 +2,11 @@ package articles import ( _ "fmt" - "github.com/jinzhu/gorm" - "github.com/wangzitian0/golang-gin-starter-kit/common" - "github.com/wangzitian0/golang-gin-starter-kit/users" "strconv" + + "github.com/gothinkster/golang-gin-realworld-example-app/common" + "github.com/gothinkster/golang-gin-realworld-example-app/users" + "github.com/jinzhu/gorm" ) type ArticleModel struct { diff --git a/articles/routers.go b/articles/routers.go index 820ed4c..b6166ef 100644 --- a/articles/routers.go +++ b/articles/routers.go @@ -2,11 +2,12 @@ package articles import ( "errors" - "github.com/wangzitian0/golang-gin-starter-kit/common" - "github.com/wangzitian0/golang-gin-starter-kit/users" - "gopkg.in/gin-gonic/gin.v1" "net/http" "strconv" + + "github.com/gin-gonic/gin" + "github.com/gothinkster/golang-gin-realworld-example-app/common" + "github.com/gothinkster/golang-gin-realworld-example-app/users" ) func ArticlesRegister(router *gin.RouterGroup) { diff --git a/articles/serializers.go b/articles/serializers.go index 0a0d4c4..0e60f8d 100644 --- a/articles/serializers.go +++ b/articles/serializers.go @@ -1,9 +1,9 @@ package articles import ( + "github.com/gin-gonic/gin" "github.com/gosimple/slug" - "github.com/wangzitian0/golang-gin-starter-kit/users" - "gopkg.in/gin-gonic/gin.v1" + "github.com/gothinkster/golang-gin-realworld-example-app/users" ) type TagSerializer struct { diff --git a/articles/validators.go b/articles/validators.go index 33082c5..36a214e 100644 --- a/articles/validators.go +++ b/articles/validators.go @@ -1,10 +1,10 @@ package articles import ( + "github.com/gin-gonic/gin" "github.com/gosimple/slug" - "github.com/wangzitian0/golang-gin-starter-kit/common" - "github.com/wangzitian0/golang-gin-starter-kit/users" - "gopkg.in/gin-gonic/gin.v1" + "github.com/gothinkster/golang-gin-realworld-example-app/common" + "github.com/gothinkster/golang-gin-realworld-example-app/users" ) type ArticleModelValidator struct { diff --git a/common/database.go b/common/database.go index 57aa3af..568a3a6 100644 --- a/common/database.go +++ b/common/database.go @@ -2,9 +2,10 @@ package common import ( "fmt" + "os" + "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/sqlite" - "os" ) type Database struct { diff --git a/common/unit_test.go b/common/unit_test.go index 71b4997..70af5aa 100644 --- a/common/unit_test.go +++ b/common/unit_test.go @@ -3,12 +3,13 @@ package common import ( "bytes" "errors" - "github.com/stretchr/testify/assert" - "gopkg.in/gin-gonic/gin.v1" "net/http" "net/http/httptest" "os" "testing" + + "github.com/gin-gonic/gin" + "github.com/stretchr/testify/assert" ) func TestConnectingDatabase(t *testing.T) { diff --git a/common/utils.go b/common/utils.go index 0c8bfa2..8720e72 100644 --- a/common/utils.go +++ b/common/utils.go @@ -6,11 +6,10 @@ import ( "math/rand" "time" - "github.com/dgrijalva/jwt-go" "gopkg.in/go-playground/validator.v8" + "github.com/gin-gonic/gin" "github.com/gin-gonic/gin/binding" - "gopkg.in/gin-gonic/gin.v1" ) var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") diff --git a/hello.go b/hello.go index b8eb678..58567d2 100644 --- a/hello.go +++ b/hello.go @@ -3,12 +3,11 @@ package main import ( "fmt" - "gopkg.in/gin-gonic/gin.v1" - + "github.com/gin-gonic/gin" + "github.com/gothinkster/golang-gin-realworld-example-app/articles" + "github.com/gothinkster/golang-gin-realworld-example-app/common" + "github.com/gothinkster/golang-gin-realworld-example-app/users" "github.com/jinzhu/gorm" - "github.com/wangzitian0/golang-gin-starter-kit/articles" - "github.com/wangzitian0/golang-gin-starter-kit/common" - "github.com/wangzitian0/golang-gin-starter-kit/users" ) func Migrate(db *gorm.DB) { diff --git a/users/middlewares.go b/users/middlewares.go index ffeda29..a5cea27 100644 --- a/users/middlewares.go +++ b/users/middlewares.go @@ -1,12 +1,13 @@ package users import ( - "github.com/dgrijalva/jwt-go" - "github.com/dgrijalva/jwt-go/request" - "github.com/wangzitian0/golang-gin-starter-kit/common" - "gopkg.in/gin-gonic/gin.v1" "net/http" "strings" + + jwt "github.com/dgrijalva/jwt-go" + "github.com/dgrijalva/jwt-go/request" + "github.com/gin-gonic/gin" + "github.com/gothinkster/golang-gin-realworld-example-app/common" ) // Strips 'TOKEN ' prefix from token string diff --git a/users/models.go b/users/models.go index f2406fb..87f41c1 100644 --- a/users/models.go +++ b/users/models.go @@ -2,8 +2,9 @@ package users import ( "errors" + + "github.com/gothinkster/golang-gin-realworld-example-app/common" "github.com/jinzhu/gorm" - "github.com/wangzitian0/golang-gin-starter-kit/common" "golang.org/x/crypto/bcrypt" ) diff --git a/users/routers.go b/users/routers.go index aa661c7..731f3d3 100644 --- a/users/routers.go +++ b/users/routers.go @@ -2,9 +2,10 @@ package users import ( "errors" - "github.com/wangzitian0/golang-gin-starter-kit/common" - "gopkg.in/gin-gonic/gin.v1" "net/http" + + "github.com/gin-gonic/gin" + "github.com/gothinkster/golang-gin-realworld-example-app/common" ) func UsersRegister(router *gin.RouterGroup) { diff --git a/users/serializers.go b/users/serializers.go index c7e23cd..81d92b4 100644 --- a/users/serializers.go +++ b/users/serializers.go @@ -1,9 +1,8 @@ package users import ( - "gopkg.in/gin-gonic/gin.v1" - - "github.com/wangzitian0/golang-gin-starter-kit/common" + "github.com/gin-gonic/gin" + "github.com/gothinkster/golang-gin-realworld-example-app/common" ) type ProfileSerializer struct { diff --git a/users/unit_test.go b/users/unit_test.go index 32f9d12..bfce1b5 100644 --- a/users/unit_test.go +++ b/users/unit_test.go @@ -1,18 +1,18 @@ package users import ( - "github.com/stretchr/testify/assert" - "testing" - "bytes" "fmt" - "github.com/jinzhu/gorm" - "github.com/wangzitian0/golang-gin-starter-kit/common" - "gopkg.in/gin-gonic/gin.v1" "net/http" "net/http/httptest" "os" _ "regexp" + "testing" + + "github.com/gin-gonic/gin" + "github.com/gothinkster/golang-gin-realworld-example-app/common" + "github.com/jinzhu/gorm" + "github.com/stretchr/testify/assert" ) var image_url = "https://golang.org/doc/gopher/frontpage.png" diff --git a/users/validators.go b/users/validators.go index 8933c99..92f6208 100644 --- a/users/validators.go +++ b/users/validators.go @@ -1,8 +1,8 @@ package users import ( - "github.com/wangzitian0/golang-gin-starter-kit/common" - "gopkg.in/gin-gonic/gin.v1" + "github.com/gin-gonic/gin" + "github.com/gothinkster/golang-gin-realworld-example-app/common" ) // *ModelValidator containing two parts: diff --git a/vendor/vendor.json b/vendor/vendor.json index ab95daa..2ddbe53 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -9,10 +9,10 @@ "revisionTime": "2017-04-10T16:13:40Z" }, { - "checksumSHA1": "mrz/kicZiUaHxkyfvC/DyQcr8Do=", + "checksumSHA1": "CSPbwbyzqA6sfORicn4HFtIhF/c=", "path": "github.com/davecgh/go-spew/spew", - "revision": "adab96458c51a58dc1783b3335dcce5461522e75", - "revisionTime": "2017-07-11T18:34:51Z" + "revision": "8991bc29aa16c548c550c7ff78260e27b9ab7c73", + "revisionTime": "2018-02-21T22:46:20Z" }, { "checksumSHA1": "GXOurDGgsLmJs0wounpdWZZRSGw=", @@ -39,22 +39,36 @@ "revisionTime": "2017-05-29T06:23:10Z" }, { - "checksumSHA1": "g1ULoqYPmgLWhNTimHlM5usWZ1s=", + "checksumSHA1": "90S9sFqcIo/uuwQzz1t/wYs7GEs=", "path": "github.com/gin-gonic/gin", - "revision": "93b3a0d7ec95c33dc327397ab1756c36853328ee", - "revisionTime": "2017-07-16T03:42:08Z" + "revision": "b869fe1415e4b9eb52f247441830d502aece2d4d", + "revisionTime": "2018-08-14T08:58:52Z", + "version": "v1.3", + "versionExact": "v1.3.0" }, { - "checksumSHA1": "A09l4+1MIuaXhh3Nn6aoOm+rr3Q=", + "checksumSHA1": "BjShmaQTKI8+411rCb7LFqJkLA0=", "path": "github.com/gin-gonic/gin/binding", - "revision": "aa6d2d29f8ac39c365aa5b72fdec01029b0d5264", - "revisionTime": "2017-07-11T15:28:08Z" + "revision": "b869fe1415e4b9eb52f247441830d502aece2d4d", + "revisionTime": "2018-08-14T08:58:52Z", + "version": "v1.3", + "versionExact": "v1.3.0" }, { - "checksumSHA1": "8UlyJTegyrXbE8UErbf2lH7X4AM=", + "checksumSHA1": "woO1qIxIeQ1bcbPSiMfAKk3r4xg=", + "path": "github.com/gin-gonic/gin/json", + "revision": "b869fe1415e4b9eb52f247441830d502aece2d4d", + "revisionTime": "2018-08-14T08:58:52Z", + "version": "v1.3", + "versionExact": "v1.3.0" + }, + { + "checksumSHA1": "f1n8P2YAi3o+X0//dkoDJ822zW0=", "path": "github.com/gin-gonic/gin/render", - "revision": "aa6d2d29f8ac39c365aa5b72fdec01029b0d5264", - "revisionTime": "2017-07-11T15:28:08Z" + "revision": "b869fe1415e4b9eb52f247441830d502aece2d4d", + "revisionTime": "2018-08-14T08:58:52Z", + "version": "v1.3", + "versionExact": "v1.3.0" }, { "checksumSHA1": "pI0js2qnSKXOzUq9AoA5CJDJNRw=", @@ -117,10 +131,10 @@ "revisionTime": "2017-07-11T23:04:30Z" }, { - "checksumSHA1": "U6lX43KDDlNOn+Z0Yyww+ZzHfFo=", + "checksumSHA1": "w5RcOnfv5YDr3j2bd1YydkPiZx4=", "path": "github.com/mattn/go-isatty", - "revision": "fc9e8d8ef48496124e79ae0df75490096eccf6fe", - "revisionTime": "2017-03-22T23:44:13Z" + "revision": "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c", + "revisionTime": "2017-11-07T05:05:31Z" }, { "checksumSHA1": "CmknXrMVBRJrx4LsIA9jEOmsLQQ=", @@ -141,28 +155,34 @@ "revisionTime": "2015-09-07T02:38:54Z" }, { - "checksumSHA1": "K0crHygPTP42i1nLKWphSlvOQJw=", + "checksumSHA1": "BBudH/js1dNI/nEfTwsAYUo9l2M=", "path": "github.com/stretchr/objx", - "revision": "1a9d0bb9f541897e62256577b352fdbc1fb4fd94", - "revisionTime": "2015-09-28T12:21:52Z" + "revision": "ef50b0de28773081167c97fc27cf29a0bf8b8c71", + "revisionTime": "2018-08-25T06:49:32Z" + }, + { + "checksumSHA1": "nj123dGxKPIF17B6y3VEK2pihRk=", + "path": "github.com/stretchr/testify", + "revision": "f35b8ab0b5a2cef36673838d662e249dd9c94686", + "revisionTime": "2018-05-06T18:05:49Z" }, { - "checksumSHA1": "J+ppEq6nYMKxhB9+c+MD1x9UwSc=", + "checksumSHA1": "c6pbpF7eowwO59phRTpF8cQ80Z0=", "path": "github.com/stretchr/testify/assert", - "revision": "05e8a0eda380579888eb53c394909df027f06991", - "revisionTime": "2017-07-13T16:51:06Z" + "revision": "f35b8ab0b5a2cef36673838d662e249dd9c94686", + "revisionTime": "2018-05-06T18:05:49Z" }, { "checksumSHA1": "fg3TzS9/QK3wZbzei3Z6O8XPLHg=", "path": "github.com/stretchr/testify/http", - "revision": "05e8a0eda380579888eb53c394909df027f06991", - "revisionTime": "2017-07-13T16:51:06Z" + "revision": "f35b8ab0b5a2cef36673838d662e249dd9c94686", + "revisionTime": "2018-05-06T18:05:49Z" }, { - "checksumSHA1": "o+jsS/rxceTym4M3reSPfrPxaio=", + "checksumSHA1": "WmBSFdqpdYRIkp0I408JIZ3LDMY=", "path": "github.com/stretchr/testify/mock", - "revision": "05e8a0eda380579888eb53c394909df027f06991", - "revisionTime": "2017-07-13T16:51:06Z" + "revision": "f35b8ab0b5a2cef36673838d662e249dd9c94686", + "revisionTime": "2018-05-06T18:05:49Z" }, { "checksumSHA1": "9Zw986fuQM/hCoVd8vmHoSM+8sU=", @@ -182,12 +202,6 @@ "revision": "abf9c25f54453410d0c6668e519582a9e1115027", "revisionTime": "2017-07-10T15:57:01Z" }, - { - "checksumSHA1": "lqXx4OhLBZFV5p4+I0OvpNabF4A=", - "path": "gopkg.in/gin-gonic/gin.v1", - "revision": "d459835d2b077e44f7c9b453505ee29881d5d12d", - "revisionTime": "2017-07-02T09:28:26Z" - }, { "checksumSHA1": "39V1idWER42Lmcmg2Uy40wMzOlo=", "path": "gopkg.in/go-playground/validator.v8", @@ -207,5 +221,5 @@ "revisionTime": "2017-07-12T05:45:46Z" } ], - "rootPath": "github.com/wangzitian0/golang-gin-starter-kit" + "rootPath": "github.com/gothinkster/golang-gin-realworld-example-app" }