diff --git a/README.markdown b/README.markdown index 2a637ac3..eda200d9 100644 --- a/README.markdown +++ b/README.markdown @@ -2,7 +2,7 @@ Redigo ====== [![Build Status](https://travis-ci.org/gomodule/redigo.svg?branch=master)](https://travis-ci.org/gomodule/redigo) -[![GoDoc](https://godoc.org/github.com/gomodule/redigo/redis?status.svg)](https://godoc.org/github.com/gomodule/redigo/redis) +[![GoDoc](https://godoc.org/github.com/gomodule/redigo/redis?status.svg)](https://pkg.go.dev/github.com/gomodule/redigo/redis/v3) Redigo is a [Go](http://golang.org/) client for the [Redis](http://redis.io/) database. @@ -28,10 +28,15 @@ Installation Install Redigo using the "go get" command: - go get github.com/gomodule/redigo/redis + go get github.com/gomodule/redigo/redis/v3 The Go distribution is Redigo's only dependency. +Updating +-------- + +If you you were using `redigo` prior to the `v3` tag and are using `go mod` you'll need to update your import paths to add the `/v3` suffix as detailed by [Installation](#installation). A community tool [github.com/marwan-at-work/mod](https://github.com/marwan-at-work/mod) helps automate this procedure. See the [repository](https://github.com/marwan-at-work/mod) or the [community tooling FAQ](https://github.com/golang/go/wiki/Modules#what-community-tooling-exists-for-working-with-modules) below for an overview. + Related Projects ---------------- diff --git a/redis/conn_test.go b/redis/conn_test.go index f5dfb6db..254869fb 100644 --- a/redis/conn_test.go +++ b/redis/conn_test.go @@ -28,7 +28,7 @@ import ( "testing" "time" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" ) type testConn struct { diff --git a/redis/go.mod b/redis/go.mod new file mode 100644 index 00000000..e6689f35 --- /dev/null +++ b/redis/go.mod @@ -0,0 +1,5 @@ +module github.com/gomodule/redigo/redis/v3 + +go 1.13 + +require github.com/stretchr/testify v1.4.0 diff --git a/redis/go.sum b/redis/go.sum new file mode 100644 index 00000000..8fdee585 --- /dev/null +++ b/redis/go.sum @@ -0,0 +1,11 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/redis/pool_test.go b/redis/pool_test.go index 3864d2a9..78834450 100644 --- a/redis/pool_test.go +++ b/redis/pool_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" ) const ( diff --git a/redis/pubsub_example_test.go b/redis/pubsub_example_test.go index 39d0abf8..21e11790 100644 --- a/redis/pubsub_example_test.go +++ b/redis/pubsub_example_test.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" ) // listenPubSubChannels listens for messages on Redis pubsub channels. The diff --git a/redis/pubsub_test.go b/redis/pubsub_test.go index 13f3f797..3db18aa2 100644 --- a/redis/pubsub_test.go +++ b/redis/pubsub_test.go @@ -19,7 +19,7 @@ import ( "testing" "time" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" ) func expectPushed(t *testing.T, c redis.PubSubConn, message string, expected interface{}) { diff --git a/redis/redis_test.go b/redis/redis_test.go index 5a98f535..be45cf6c 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -18,7 +18,7 @@ import ( "testing" "time" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" ) type timeoutTestConn int diff --git a/redis/reply_test.go b/redis/reply_test.go index 3aca3a44..628b5ff4 100644 --- a/redis/reply_test.go +++ b/redis/reply_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" ) type valueError struct { diff --git a/redis/scan_test.go b/redis/scan_test.go index 8d06b3c5..6804fb50 100644 --- a/redis/scan_test.go +++ b/redis/scan_test.go @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" "github.com/stretchr/testify/require" ) diff --git a/redis/script_test.go b/redis/script_test.go index 388e167f..5b1f3351 100644 --- a/redis/script_test.go +++ b/redis/script_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" ) var ( diff --git a/redis/zpop_example_test.go b/redis/zpop_example_test.go index f7702e03..5821630f 100644 --- a/redis/zpop_example_test.go +++ b/redis/zpop_example_test.go @@ -17,7 +17,7 @@ package redis_test import ( "fmt" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" ) // zpop pops a value from the ZSET key using WATCH/MULTI/EXEC commands. diff --git a/redisx/connmux.go b/redisx/connmux.go index 6ae1f9d1..11b25661 100644 --- a/redisx/connmux.go +++ b/redisx/connmux.go @@ -18,7 +18,7 @@ import ( "errors" "sync" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" ) // ConnMux multiplexes one or more connections to a single underlying diff --git a/redisx/connmux_test.go b/redisx/connmux_test.go index e035a59f..8385e6e5 100644 --- a/redisx/connmux_test.go +++ b/redisx/connmux_test.go @@ -19,8 +19,8 @@ import ( "sync" "testing" - "github.com/gomodule/redigo/redis" - "github.com/gomodule/redigo/redisx" + "github.com/gomodule/redigo/redis/v3" + "github.com/gomodule/redigo/redisx/v3" ) func TestConnMux(t *testing.T) { diff --git a/redisx/db_test.go b/redisx/db_test.go index ead64744..80a8cf49 100644 --- a/redisx/db_test.go +++ b/redisx/db_test.go @@ -19,7 +19,7 @@ import ( "errors" "time" - "github.com/gomodule/redigo/redis" + "github.com/gomodule/redigo/redis/v3" ) type testConn struct { diff --git a/redisx/go.mod b/redisx/go.mod new file mode 100644 index 00000000..9599b62c --- /dev/null +++ b/redisx/go.mod @@ -0,0 +1,8 @@ +module github.com/gomodule/redigo/redisx/v3 + +go 1.13 + +require github.com/gomodule/redigo/redis/v3 v3.0.0 + +// This is needed if you want to use a locally modified version of the github.com/gomodule/redigo/redis package +// replace github.com/gomodule/redigo/redis/v3 => ../redis diff --git a/redisx/go.sum b/redisx/go.sum new file mode 100644 index 00000000..8fdee585 --- /dev/null +++ b/redisx/go.sum @@ -0,0 +1,11 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=