From 5d0a0c1e8f2a6020b3809d8beaabdce908fe5667 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 4 Aug 2019 08:46:08 +0800 Subject: [PATCH 1/2] update macaron --- README.md | 2 +- flash.go | 2 +- flash_test.go | 2 +- go.mod | 6 ++---- go.sum | 12 ++++++------ ledis/ledis_test.go | 2 +- memcache/memcache_test.go | 2 +- mysql/mysql_test.go | 2 +- nodb/nodb_test.go | 2 +- postgres/postgres_test.go | 2 +- redis/redis_test.go | 2 +- session.go | 2 +- session_test.go | 2 +- 13 files changed, 19 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 3f443c7..ebbbff5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # session -Middleware session provides session management for [Macaron](https://github.com/go-macaron/macaron). It can use many session providers, including memory, file, Redis, Memcache, PostgreSQL, MySQL, Couchbase, Ledis and Nodb. +Middleware session provides session management for [Macaron](https://gitea.com/macaron/macaron). It can use many session providers, including memory, file, Redis, Memcache, PostgreSQL, MySQL, Couchbase, Ledis and Nodb. ### Installation diff --git a/flash.go b/flash.go index 99aae71..93c461d 100644 --- a/flash.go +++ b/flash.go @@ -17,7 +17,7 @@ package session import ( "net/url" - "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" ) type Flash struct { diff --git a/flash_test.go b/flash_test.go index 8cd53bc..3e4bbfb 100644 --- a/flash_test.go +++ b/flash_test.go @@ -20,7 +20,7 @@ import ( "testing" . "github.com/smartystreets/goconvey/convey" - "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" ) func Test_Flash(t *testing.T) { diff --git a/go.mod b/go.mod index cfa4aaf..3ad1e8b 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module gitea.com/macaron/session go 1.11 require ( + gitea.com/macaron/macaron v1.3.3-0.20190803174002-53e005ff4827 github.com/Unknwon/com v0.0.0-20190321035513-0fed4efef755 github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668 github.com/couchbase/gomemcached v0.0.0-20190515232915-c4b4ca0eb21d // indirect @@ -10,7 +11,6 @@ require ( github.com/couchbaselabs/go-couchbase v0.0.0-20190708161019-23e7ca2ce2b7 github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect - github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191 // indirect github.com/go-redis/redis v6.15.2+incompatible github.com/go-sql-driver/mysql v1.4.1 github.com/lib/pq v1.2.0 @@ -23,12 +23,10 @@ require ( github.com/siddontang/go-snappy v0.0.0-20140704025258-d8f7bb82a96d // indirect github.com/siddontang/ledisdb v0.0.0-20190202134119-8ceb77e66a92 github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d // indirect - github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945 + github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 github.com/stretchr/testify v1.3.0 // indirect github.com/syndtr/goleveldb v1.0.0 // indirect - golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 // indirect google.golang.org/appengine v1.6.1 // indirect gopkg.in/ini.v1 v1.44.0 - gopkg.in/macaron.v1 v1.3.2 ) diff --git a/go.sum b/go.sum index b748c9f..b8635c1 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,7 @@ +gitea.com/macaron/inject v0.0.0-20190803172902-8375ba841591 h1:UbCTjPcLrNxR9LzKDjQBMT2zoxZuEnca1pZCpgeMuhQ= +gitea.com/macaron/inject v0.0.0-20190803172902-8375ba841591/go.mod h1:h6E4kLao1Yko6DOU6QDnQPcuoNzvbZqzj2mtPcEn1aM= +gitea.com/macaron/macaron v1.3.3-0.20190803174002-53e005ff4827 h1:/rT4MEFjhdViy2BFWKUwbC0JSNSziEbBCM7q4/B9qgo= +gitea.com/macaron/macaron v1.3.3-0.20190803174002-53e005ff4827/go.mod h1:/rvxMjIkOq4BM8uPUb+VHuU02ZfAO6R4+wD//tiCiRw= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Unknwon/com v0.0.0-20190321035513-0fed4efef755 h1:1B7wb36fHLSwZfHg6ngZhhtIEHQjiC5H4p7qQGBEffg= @@ -19,8 +23,6 @@ github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191 h1:NjHlg70DuOkcAMqgt0+XA+NHwtu66MkTVVgR4fFWbcI= -github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191/go.mod h1:VFI2o2q9kYsC4o7VP1HrEVosiZZTd+MVT3YZx4gqvJw= github.com/go-redis/redis v6.15.2+incompatible h1:9SpNVG76gr6InJGxoZ6IuuxaCOQwDAhzyXg+Bs+0Sb4= github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= @@ -69,8 +71,8 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 h1:Jpy1PXuP99tXNrhbq2BaPz9B+jNAvH1JPQQpG/9GCXY= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= -github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945 h1:N8Bg45zpk/UcpNGnfJt2y/3lRWASHNTUET8owPYCgYI= -github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8= +github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -107,8 +109,6 @@ gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.44.0 h1:YRJzTUp0kSYWUVFF5XAbDFfyiqwsl0Vb9R8TVP5eRi0= gopkg.in/ini.v1 v1.44.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/macaron.v1 v1.3.2 h1:AvWIaPmwBUA87/OWzePkoxeaw6YJWDfBt1pDFPBnLf8= -gopkg.in/macaron.v1 v1.3.2/go.mod h1:PrsiawTWAGZs6wFbT5hlr7SQ2Ns9h7cUVtcUu4lQOVo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/ledis/ledis_test.go b/ledis/ledis_test.go index fd47e50..a1f2d08 100644 --- a/ledis/ledis_test.go +++ b/ledis/ledis_test.go @@ -20,7 +20,7 @@ import ( "testing" . "github.com/smartystreets/goconvey/convey" - "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" "gitea.com/macaron/session" ) diff --git a/memcache/memcache_test.go b/memcache/memcache_test.go index d2f5473..0af2428 100644 --- a/memcache/memcache_test.go +++ b/memcache/memcache_test.go @@ -20,7 +20,7 @@ import ( "testing" . "github.com/smartystreets/goconvey/convey" - "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" "gitea.com/macaron/session" ) diff --git a/mysql/mysql_test.go b/mysql/mysql_test.go index fc205fc..e921d30 100644 --- a/mysql/mysql_test.go +++ b/mysql/mysql_test.go @@ -21,7 +21,7 @@ import ( "time" . "github.com/smartystreets/goconvey/convey" - "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" "gitea.com/macaron/session" ) diff --git a/nodb/nodb_test.go b/nodb/nodb_test.go index e168aeb..51b394e 100644 --- a/nodb/nodb_test.go +++ b/nodb/nodb_test.go @@ -20,7 +20,7 @@ import ( "testing" . "github.com/smartystreets/goconvey/convey" - "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" "gitea.com/macaron/session" ) diff --git a/postgres/postgres_test.go b/postgres/postgres_test.go index f105aa2..0d7b150 100644 --- a/postgres/postgres_test.go +++ b/postgres/postgres_test.go @@ -21,7 +21,7 @@ import ( "time" . "github.com/smartystreets/goconvey/convey" - "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" "gitea.com/macaron/session" ) diff --git a/redis/redis_test.go b/redis/redis_test.go index fba911e..e1184ac 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -20,7 +20,7 @@ import ( "testing" . "github.com/smartystreets/goconvey/convey" - "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" "gitea.com/macaron/session" ) diff --git a/session.go b/session.go index 43254b6..93f1834 100644 --- a/session.go +++ b/session.go @@ -24,7 +24,7 @@ import ( "net/url" "time" - "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" ) const _VERSION = "0.6.0" diff --git a/session_test.go b/session_test.go index 2063196..c59c74f 100644 --- a/session_test.go +++ b/session_test.go @@ -22,7 +22,7 @@ import ( "time" . "github.com/smartystreets/goconvey/convey" - "gopkg.in/macaron.v1" + "gitea.com/macaron/macaron" ) func Test_Version(t *testing.T) { -- 2.40.1 From 984dcc19a9ace33ce43e51c77a206ccb42d79ddd Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 4 Aug 2019 09:08:57 +0800 Subject: [PATCH 2/2] update package import order --- couchbase/couchbase.go | 3 +-- flash_test.go | 2 +- ledis/ledis.go | 3 +-- ledis/ledis_test.go | 3 +-- memcache/memcache.go | 3 +-- memcache/memcache_test.go | 3 +-- mysql/mysql.go | 3 +-- mysql/mysql_test.go | 3 +-- nodb/nodb.go | 3 +-- nodb/nodb_test.go | 3 +-- postgres/postgres.go | 3 +-- postgres/postgres_test.go | 3 +-- redis/redis.go | 3 +-- redis/redis_test.go | 3 +-- session_test.go | 2 +- 15 files changed, 15 insertions(+), 28 deletions(-) diff --git a/couchbase/couchbase.go b/couchbase/couchbase.go index 06694f4..8f5a32f 100644 --- a/couchbase/couchbase.go +++ b/couchbase/couchbase.go @@ -19,9 +19,8 @@ import ( "strings" "sync" - "github.com/couchbaselabs/go-couchbase" - "gitea.com/macaron/session" + "github.com/couchbaselabs/go-couchbase" ) // CouchbaseSessionStore represents a couchbase session store implementation. diff --git a/flash_test.go b/flash_test.go index 3e4bbfb..0bd4076 100644 --- a/flash_test.go +++ b/flash_test.go @@ -19,8 +19,8 @@ import ( "net/http/httptest" "testing" - . "github.com/smartystreets/goconvey/convey" "gitea.com/macaron/macaron" + . "github.com/smartystreets/goconvey/convey" ) func Test_Flash(t *testing.T) { diff --git a/ledis/ledis.go b/ledis/ledis.go index 6d225da..1ac4ce6 100644 --- a/ledis/ledis.go +++ b/ledis/ledis.go @@ -20,12 +20,11 @@ import ( "strings" "sync" + "gitea.com/macaron/session" "github.com/Unknwon/com" "github.com/siddontang/ledisdb/config" "github.com/siddontang/ledisdb/ledis" "gopkg.in/ini.v1" - - "gitea.com/macaron/session" ) // LedisStore represents a ledis session store implementation. diff --git a/ledis/ledis_test.go b/ledis/ledis_test.go index a1f2d08..3ef36b0 100644 --- a/ledis/ledis_test.go +++ b/ledis/ledis_test.go @@ -19,10 +19,9 @@ import ( "net/http/httptest" "testing" - . "github.com/smartystreets/goconvey/convey" "gitea.com/macaron/macaron" - "gitea.com/macaron/session" + . "github.com/smartystreets/goconvey/convey" ) func Test_LedisProvider(t *testing.T) { diff --git a/memcache/memcache.go b/memcache/memcache.go index cd65678..ff12097 100644 --- a/memcache/memcache.go +++ b/memcache/memcache.go @@ -20,9 +20,8 @@ import ( "strings" "sync" - "github.com/bradfitz/gomemcache/memcache" - "gitea.com/macaron/session" + "github.com/bradfitz/gomemcache/memcache" ) // MemcacheStore represents a memcache session store implementation. diff --git a/memcache/memcache_test.go b/memcache/memcache_test.go index 0af2428..4e2786d 100644 --- a/memcache/memcache_test.go +++ b/memcache/memcache_test.go @@ -19,10 +19,9 @@ import ( "net/http/httptest" "testing" - . "github.com/smartystreets/goconvey/convey" "gitea.com/macaron/macaron" - "gitea.com/macaron/session" + . "github.com/smartystreets/goconvey/convey" ) func Test_MemcacheProvider(t *testing.T) { diff --git a/mysql/mysql.go b/mysql/mysql.go index d9563ed..da5079b 100644 --- a/mysql/mysql.go +++ b/mysql/mysql.go @@ -22,9 +22,8 @@ import ( "sync" "time" - _ "github.com/go-sql-driver/mysql" - "gitea.com/macaron/session" + _ "github.com/go-sql-driver/mysql" ) // MysqlStore represents a mysql session store implementation. diff --git a/mysql/mysql_test.go b/mysql/mysql_test.go index e921d30..ad609a5 100644 --- a/mysql/mysql_test.go +++ b/mysql/mysql_test.go @@ -20,10 +20,9 @@ import ( "testing" "time" - . "github.com/smartystreets/goconvey/convey" "gitea.com/macaron/macaron" - "gitea.com/macaron/session" + . "github.com/smartystreets/goconvey/convey" ) func Test_MysqlProvider(t *testing.T) { diff --git a/nodb/nodb.go b/nodb/nodb.go index 243c456..db174e7 100644 --- a/nodb/nodb.go +++ b/nodb/nodb.go @@ -18,10 +18,9 @@ import ( "fmt" "sync" + "gitea.com/macaron/session" "github.com/lunny/nodb" "github.com/lunny/nodb/config" - - "gitea.com/macaron/session" ) // NodbStore represents a nodb session store implementation. diff --git a/nodb/nodb_test.go b/nodb/nodb_test.go index 51b394e..8104248 100644 --- a/nodb/nodb_test.go +++ b/nodb/nodb_test.go @@ -19,10 +19,9 @@ import ( "net/http/httptest" "testing" - . "github.com/smartystreets/goconvey/convey" "gitea.com/macaron/macaron" - "gitea.com/macaron/session" + . "github.com/smartystreets/goconvey/convey" ) func Test_LedisProvider(t *testing.T) { diff --git a/postgres/postgres.go b/postgres/postgres.go index 5f70536..c307241 100644 --- a/postgres/postgres.go +++ b/postgres/postgres.go @@ -22,9 +22,8 @@ import ( "sync" "time" - _ "github.com/lib/pq" - "gitea.com/macaron/session" + _ "github.com/lib/pq" ) // PostgresStore represents a postgres session store implementation. diff --git a/postgres/postgres_test.go b/postgres/postgres_test.go index 0d7b150..4fad1e4 100644 --- a/postgres/postgres_test.go +++ b/postgres/postgres_test.go @@ -20,10 +20,9 @@ import ( "testing" "time" - . "github.com/smartystreets/goconvey/convey" "gitea.com/macaron/macaron" - "gitea.com/macaron/session" + . "github.com/smartystreets/goconvey/convey" ) func Test_PostgresProvider(t *testing.T) { diff --git a/redis/redis.go b/redis/redis.go index 2155acc..eed7b27 100644 --- a/redis/redis.go +++ b/redis/redis.go @@ -21,11 +21,10 @@ import ( "sync" "time" + "gitea.com/macaron/session" "github.com/Unknwon/com" "github.com/go-redis/redis" "gopkg.in/ini.v1" - - "gitea.com/macaron/session" ) // RedisStore represents a redis session store implementation. diff --git a/redis/redis_test.go b/redis/redis_test.go index e1184ac..dd385b7 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -19,10 +19,9 @@ import ( "net/http/httptest" "testing" - . "github.com/smartystreets/goconvey/convey" "gitea.com/macaron/macaron" - "gitea.com/macaron/session" + . "github.com/smartystreets/goconvey/convey" ) func Test_RedisProvider(t *testing.T) { diff --git a/session_test.go b/session_test.go index c59c74f..5716766 100644 --- a/session_test.go +++ b/session_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - . "github.com/smartystreets/goconvey/convey" "gitea.com/macaron/macaron" + . "github.com/smartystreets/goconvey/convey" ) func Test_Version(t *testing.T) { -- 2.40.1