From 7779accbea56ae80fa7ff2080f27941445fe39dc Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Thu, 8 Aug 2019 14:29:44 +0300 Subject: [PATCH] Use semantic import versioning --- bench_test.go | 2 +- cluster.go | 8 ++++---- cluster_test.go | 4 ++-- command.go | 6 +++--- command_test.go | 2 +- commands.go | 2 +- commands_test.go | 4 ++-- error.go | 2 +- example_instrumentation_test.go | 2 +- example_test.go | 2 +- export_test.go | 4 ++-- go.mod | 2 +- go.sum | 1 + internal/pool/bench_test.go | 2 +- internal/pool/conn.go | 2 +- internal/pool/pool.go | 2 +- internal/pool/pool_test.go | 2 +- internal/proto/reader.go | 2 +- internal/proto/reader_test.go | 2 +- internal/proto/scan.go | 2 +- internal/proto/write_buffer_test.go | 2 +- internal/proto/writer.go | 2 +- internal/util.go | 2 +- iterator_test.go | 2 +- main_test.go | 2 +- options.go | 2 +- pipeline.go | 2 +- pipeline_test.go | 2 +- pool_test.go | 2 +- pubsub.go | 6 +++--- pubsub_test.go | 2 +- race_test.go | 2 +- redis.go | 6 +++--- redis_test.go | 2 +- ring.go | 8 ++++---- ring_test.go | 2 +- sentinel.go | 4 ++-- sentinel_test.go | 2 +- tx.go | 4 ++-- tx_test.go | 2 +- universal_test.go | 2 +- 41 files changed, 58 insertions(+), 57 deletions(-) diff --git a/bench_test.go b/bench_test.go index 834ba07..f670a7c 100644 --- a/bench_test.go +++ b/bench_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" ) func benchmarkRedisClient(poolSize int) *redis.Client { diff --git a/cluster.go b/cluster.go index d65fbff..3559b12 100644 --- a/cluster.go +++ b/cluster.go @@ -13,10 +13,10 @@ import ( "sync/atomic" "time" - "github.com/go-redis/redis/internal" - "github.com/go-redis/redis/internal/hashtag" - "github.com/go-redis/redis/internal/pool" - "github.com/go-redis/redis/internal/proto" + "github.com/go-redis/redis/v7/internal" + "github.com/go-redis/redis/v7/internal/hashtag" + "github.com/go-redis/redis/v7/internal/pool" + "github.com/go-redis/redis/v7/internal/proto" ) var errClusterNoNodes = fmt.Errorf("redis: cluster has no nodes") diff --git a/cluster_test.go b/cluster_test.go index aa92a81..f4b7e36 100644 --- a/cluster_test.go +++ b/cluster_test.go @@ -9,8 +9,8 @@ import ( "sync" "time" - "github.com/go-redis/redis" - "github.com/go-redis/redis/internal/hashtag" + "github.com/go-redis/redis/v7" + "github.com/go-redis/redis/v7/internal/hashtag" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/command.go b/command.go index bd35784..02a3e1e 100644 --- a/command.go +++ b/command.go @@ -7,9 +7,9 @@ import ( "strings" "time" - "github.com/go-redis/redis/internal" - "github.com/go-redis/redis/internal/proto" - "github.com/go-redis/redis/internal/util" + "github.com/go-redis/redis/v7/internal" + "github.com/go-redis/redis/v7/internal/proto" + "github.com/go-redis/redis/v7/internal/util" ) type Cmder interface { diff --git a/command_test.go b/command_test.go index 54e9945..a0d753e 100644 --- a/command_test.go +++ b/command_test.go @@ -3,7 +3,7 @@ package redis_test import ( "time" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/commands.go b/commands.go index 1f07f36..ec2d4c9 100644 --- a/commands.go +++ b/commands.go @@ -5,7 +5,7 @@ import ( "io" "time" - "github.com/go-redis/redis/internal" + "github.com/go-redis/redis/v7/internal" ) func usePrecise(dur time.Duration) bool { diff --git a/commands_test.go b/commands_test.go index 7fa9b73..d1bb6ed 100644 --- a/commands_test.go +++ b/commands_test.go @@ -9,8 +9,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/go-redis/redis" - "github.com/go-redis/redis/internal/proto" + "github.com/go-redis/redis/v7" + "github.com/go-redis/redis/v7/internal/proto" ) var _ = Describe("Commands", func() { diff --git a/error.go b/error.go index 0ab014d..a84c44f 100644 --- a/error.go +++ b/error.go @@ -6,7 +6,7 @@ import ( "net" "strings" - "github.com/go-redis/redis/internal/proto" + "github.com/go-redis/redis/v7/internal/proto" ) func isRetryableError(err error, retryTimeout bool) bool { diff --git a/example_instrumentation_test.go b/example_instrumentation_test.go index e128ae3..cbe03da 100644 --- a/example_instrumentation_test.go +++ b/example_instrumentation_test.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" ) type redisHook struct{} diff --git a/example_test.go b/example_test.go index d986a81..89d06fa 100644 --- a/example_test.go +++ b/example_test.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" ) var redisdb *redis.Client diff --git a/export_test.go b/export_test.go index 4dc0c62..899bb9a 100644 --- a/export_test.go +++ b/export_test.go @@ -5,8 +5,8 @@ import ( "net" "strings" - "github.com/go-redis/redis/internal/hashtag" - "github.com/go-redis/redis/internal/pool" + "github.com/go-redis/redis/v7/internal/hashtag" + "github.com/go-redis/redis/v7/internal/pool" ) func (c *baseClient) Pool() pool.Pooler { diff --git a/go.mod b/go.mod index eb4969d..32a3ad7 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/go-redis/redis +module github.com/go-redis/redis/v7 require ( github.com/onsi/ginkgo v1.8.0 diff --git a/go.sum b/go.sum index 4fd21a1..9a98167 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,6 @@ 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-redis/redis v6.15.3+incompatible h1:NZ0O90AhLSvSrvLZ/S9h7D4kl1mW2PrKyxL7MyBKO2g= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= diff --git a/internal/pool/bench_test.go b/internal/pool/bench_test.go index 197604c..0d3620e 100644 --- a/internal/pool/bench_test.go +++ b/internal/pool/bench_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/go-redis/redis/internal/pool" + "github.com/go-redis/redis/v7/internal/pool" ) type poolGetPutBenchmark struct { diff --git a/internal/pool/conn.go b/internal/pool/conn.go index 0b64ccf..1dc6e97 100644 --- a/internal/pool/conn.go +++ b/internal/pool/conn.go @@ -6,7 +6,7 @@ import ( "sync/atomic" "time" - "github.com/go-redis/redis/internal/proto" + "github.com/go-redis/redis/v7/internal/proto" ) var noDeadline = time.Time{} diff --git a/internal/pool/pool.go b/internal/pool/pool.go index 1ac34fb..4cdcff2 100644 --- a/internal/pool/pool.go +++ b/internal/pool/pool.go @@ -8,7 +8,7 @@ import ( "sync/atomic" "time" - "github.com/go-redis/redis/internal" + "github.com/go-redis/redis/v7/internal" ) var ErrClosed = errors.New("redis: client is closed") diff --git a/internal/pool/pool_test.go b/internal/pool/pool_test.go index 158c17c..f29600f 100644 --- a/internal/pool/pool_test.go +++ b/internal/pool/pool_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/go-redis/redis/internal/pool" + "github.com/go-redis/redis/v7/internal/pool" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/internal/proto/reader.go b/internal/proto/reader.go index 7a9755a..7a2777e 100644 --- a/internal/proto/reader.go +++ b/internal/proto/reader.go @@ -6,7 +6,7 @@ import ( "io" "strconv" - "github.com/go-redis/redis/internal/util" + "github.com/go-redis/redis/v7/internal/util" ) const ( diff --git a/internal/proto/reader_test.go b/internal/proto/reader_test.go index c4a4c12..1e87f34 100644 --- a/internal/proto/reader_test.go +++ b/internal/proto/reader_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/go-redis/redis/internal/proto" + "github.com/go-redis/redis/v7/internal/proto" ) func BenchmarkReader_ParseReply_Status(b *testing.B) { diff --git a/internal/proto/scan.go b/internal/proto/scan.go index 3bdb33f..90c1e4a 100644 --- a/internal/proto/scan.go +++ b/internal/proto/scan.go @@ -5,7 +5,7 @@ import ( "fmt" "reflect" - "github.com/go-redis/redis/internal/util" + "github.com/go-redis/redis/v7/internal/util" ) func Scan(b []byte, v interface{}) error { diff --git a/internal/proto/write_buffer_test.go b/internal/proto/write_buffer_test.go index 2de532e..4a9339e 100644 --- a/internal/proto/write_buffer_test.go +++ b/internal/proto/write_buffer_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/go-redis/redis/internal/proto" + "github.com/go-redis/redis/v7/internal/proto" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/internal/proto/writer.go b/internal/proto/writer.go index ab2739e..7e77a3b 100644 --- a/internal/proto/writer.go +++ b/internal/proto/writer.go @@ -8,7 +8,7 @@ import ( "strconv" "time" - "github.com/go-redis/redis/internal/util" + "github.com/go-redis/redis/v7/internal/util" ) type Writer struct { diff --git a/internal/util.go b/internal/util.go index 30223fb..844f34b 100644 --- a/internal/util.go +++ b/internal/util.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/go-redis/redis/internal/util" + "github.com/go-redis/redis/v7/internal/util" ) func Sleep(ctx context.Context, dur time.Duration) error { diff --git a/iterator_test.go b/iterator_test.go index a2e6238..fce3ea1 100644 --- a/iterator_test.go +++ b/iterator_test.go @@ -3,7 +3,7 @@ package redis_test import ( "fmt" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/main_test.go b/main_test.go index f51c637..33c970c 100644 --- a/main_test.go +++ b/main_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/options.go b/options.go index 095be5a..4711042 100644 --- a/options.go +++ b/options.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/go-redis/redis/internal/pool" + "github.com/go-redis/redis/v7/internal/pool" ) // Limiter is the interface of a rate limiter or a circuit breaker. diff --git a/pipeline.go b/pipeline.go index d5c7fbb..d48566a 100644 --- a/pipeline.go +++ b/pipeline.go @@ -4,7 +4,7 @@ import ( "context" "sync" - "github.com/go-redis/redis/internal/pool" + "github.com/go-redis/redis/v7/internal/pool" ) type pipelineExecer func(context.Context, []Cmder) error diff --git a/pipeline_test.go b/pipeline_test.go index 0d7b83e..fb82e4e 100644 --- a/pipeline_test.go +++ b/pipeline_test.go @@ -1,7 +1,7 @@ package redis_test import ( - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/pool_test.go b/pool_test.go index 2f3b10e..ab44308 100644 --- a/pool_test.go +++ b/pool_test.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/pubsub.go b/pubsub.go index 72226d3..c465078 100644 --- a/pubsub.go +++ b/pubsub.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/go-redis/redis/internal" - "github.com/go-redis/redis/internal/pool" - "github.com/go-redis/redis/internal/proto" + "github.com/go-redis/redis/v7/internal" + "github.com/go-redis/redis/v7/internal/pool" + "github.com/go-redis/redis/v7/internal/proto" ) const pingTimeout = 30 * time.Second diff --git a/pubsub_test.go b/pubsub_test.go index ea4b26e..1544c9d 100644 --- a/pubsub_test.go +++ b/pubsub_test.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/race_test.go b/race_test.go index 04effc4..a1dace6 100644 --- a/race_test.go +++ b/race_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/redis.go b/redis.go index 6695576..239d36d 100644 --- a/redis.go +++ b/redis.go @@ -6,9 +6,9 @@ import ( "log" "time" - "github.com/go-redis/redis/internal" - "github.com/go-redis/redis/internal/pool" - "github.com/go-redis/redis/internal/proto" + "github.com/go-redis/redis/v7/internal" + "github.com/go-redis/redis/v7/internal/pool" + "github.com/go-redis/redis/v7/internal/proto" ) // Nil reply Redis returns when key does not exist. diff --git a/redis_test.go b/redis_test.go index d763380..cd9cd1b 100644 --- a/redis_test.go +++ b/redis_test.go @@ -6,7 +6,7 @@ import ( "net" "time" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/ring.go b/ring.go index 5b7a7b9..c6f592d 100644 --- a/ring.go +++ b/ring.go @@ -10,10 +10,10 @@ import ( "sync/atomic" "time" - "github.com/go-redis/redis/internal" - "github.com/go-redis/redis/internal/consistenthash" - "github.com/go-redis/redis/internal/hashtag" - "github.com/go-redis/redis/internal/pool" + "github.com/go-redis/redis/v7/internal" + "github.com/go-redis/redis/v7/internal/consistenthash" + "github.com/go-redis/redis/v7/internal/hashtag" + "github.com/go-redis/redis/v7/internal/pool" ) // Hash is type of hash function used in consistent hash. diff --git a/ring_test.go b/ring_test.go index ff4b3fb..e35daeb 100644 --- a/ring_test.go +++ b/ring_test.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/sentinel.go b/sentinel.go index 0e26da1..653e202 100644 --- a/sentinel.go +++ b/sentinel.go @@ -9,8 +9,8 @@ import ( "sync" "time" - "github.com/go-redis/redis/internal" - "github.com/go-redis/redis/internal/pool" + "github.com/go-redis/redis/v7/internal" + "github.com/go-redis/redis/v7/internal/pool" ) //------------------------------------------------------------------------------ diff --git a/sentinel_test.go b/sentinel_test.go index 64c8e6e..9f86ebf 100644 --- a/sentinel_test.go +++ b/sentinel_test.go @@ -1,7 +1,7 @@ package redis_test import ( - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/tx.go b/tx.go index 327f1ab..b60036d 100644 --- a/tx.go +++ b/tx.go @@ -3,8 +3,8 @@ package redis import ( "context" - "github.com/go-redis/redis/internal/pool" - "github.com/go-redis/redis/internal/proto" + "github.com/go-redis/redis/v7/internal/pool" + "github.com/go-redis/redis/v7/internal/proto" ) // TxFailedErr transaction redis failed. diff --git a/tx_test.go b/tx_test.go index dc3139c..dd10972 100644 --- a/tx_test.go +++ b/tx_test.go @@ -5,7 +5,7 @@ import ( "strconv" "sync" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/universal_test.go b/universal_test.go index 2a0850d..f22f69c 100644 --- a/universal_test.go +++ b/universal_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/go-redis/redis" + "github.com/go-redis/redis/v7" ) var _ = Describe("UniversalClient", func() {