diff --git a/.travis.yml b/.travis.yml index a06ac2c32..20a5a99d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,3 +21,7 @@ go_import_path: github.com/go-redis/redis before_install: - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1 + +script: + - cd v7 + - make diff --git a/forward.go b/forward.go new file mode 100644 index 000000000..968270baf --- /dev/null +++ b/forward.go @@ -0,0 +1,478 @@ +package redis + +import ( + "log" + "time" + + "github.com/go-redis/redis/v7" +) + +// generated by goforward -filename forward.go github.com/go-redis/redis/v7 github.com/go-redis/redis + +// ClusterOptions are used to configure a cluster client and should be +// passed to NewClusterClient. +type ClusterOptions = redis.ClusterOptions + +// ClusterClient is a Redis Cluster client representing a pool of zero +// or more underlying connections. It's safe for concurrent use by +// multiple goroutines. +type ClusterClient = redis.ClusterClient + +// NewClusterClient returns a Redis Cluster client as described in +// http://redis.io/topics/cluster-spec. +func NewClusterClient(opt *ClusterOptions) *ClusterClient { + return redis.NewClusterClient(opt) +} + +type Cmder = redis.Cmder + +type Cmd = redis.Cmd + +func NewCmd(args ...interface{}) *Cmd { + return redis.NewCmd(args...) +} + +type SliceCmd = redis.SliceCmd + +func NewSliceCmd(args ...interface{}) *SliceCmd { + return redis.NewSliceCmd(args...) +} + +type StatusCmd = redis.StatusCmd + +func NewStatusCmd(args ...interface{}) *StatusCmd { + return redis.NewStatusCmd(args...) +} + +type IntCmd = redis.IntCmd + +func NewIntCmd(args ...interface{}) *IntCmd { + return redis.NewIntCmd(args...) +} + +type IntSliceCmd = redis.IntSliceCmd + +func NewIntSliceCmd(args ...interface{}) *IntSliceCmd { + return redis.NewIntSliceCmd(args...) +} + +type DurationCmd = redis.DurationCmd + +func NewDurationCmd(precision time.Duration, args ...interface{}) *DurationCmd { + return redis.NewDurationCmd(precision, args...) +} + +type TimeCmd = redis.TimeCmd + +func NewTimeCmd(args ...interface{}) *TimeCmd { + return redis.NewTimeCmd(args...) +} + +type BoolCmd = redis.BoolCmd + +func NewBoolCmd(args ...interface{}) *BoolCmd { + return redis.NewBoolCmd(args...) +} + +type StringCmd = redis.StringCmd + +func NewStringCmd(args ...interface{}) *StringCmd { + return redis.NewStringCmd(args...) +} + +type FloatCmd = redis.FloatCmd + +func NewFloatCmd(args ...interface{}) *FloatCmd { + return redis.NewFloatCmd(args...) +} + +type StringSliceCmd = redis.StringSliceCmd + +func NewStringSliceCmd(args ...interface{}) *StringSliceCmd { + return redis.NewStringSliceCmd(args...) +} + +type BoolSliceCmd = redis.BoolSliceCmd + +func NewBoolSliceCmd(args ...interface{}) *BoolSliceCmd { + return redis.NewBoolSliceCmd(args...) +} + +type StringStringMapCmd = redis.StringStringMapCmd + +func NewStringStringMapCmd(args ...interface{}) *StringStringMapCmd { + return redis.NewStringStringMapCmd(args...) +} + +type StringIntMapCmd = redis.StringIntMapCmd + +func NewStringIntMapCmd(args ...interface{}) *StringIntMapCmd { + return redis.NewStringIntMapCmd(args...) +} + +type StringStructMapCmd = redis.StringStructMapCmd + +func NewStringStructMapCmd(args ...interface{}) *StringStructMapCmd { + return redis.NewStringStructMapCmd(args...) +} + +type XMessage = redis.XMessage + +type XMessageSliceCmd = redis.XMessageSliceCmd + +func NewXMessageSliceCmd(args ...interface{}) *XMessageSliceCmd { + return redis.NewXMessageSliceCmd(args...) +} + +type XStream = redis.XStream + +type XStreamSliceCmd = redis.XStreamSliceCmd + +func NewXStreamSliceCmd(args ...interface{}) *XStreamSliceCmd { + return redis.NewXStreamSliceCmd(args...) +} + +type XPending = redis.XPending + +type XPendingCmd = redis.XPendingCmd + +func NewXPendingCmd(args ...interface{}) *XPendingCmd { + return redis.NewXPendingCmd(args...) +} + +type XPendingExt = redis.XPendingExt + +type XPendingExtCmd = redis.XPendingExtCmd + +func NewXPendingExtCmd(args ...interface{}) *XPendingExtCmd { + return redis.NewXPendingExtCmd(args...) +} + +type ZSliceCmd = redis.ZSliceCmd + +func NewZSliceCmd(args ...interface{}) *ZSliceCmd { + return redis.NewZSliceCmd(args...) +} + +type ZWithKeyCmd = redis.ZWithKeyCmd + +func NewZWithKeyCmd(args ...interface{}) *ZWithKeyCmd { + return redis.NewZWithKeyCmd(args...) +} + +type ScanCmd = redis.ScanCmd + +func NewScanCmd(process func(cmd Cmder) error, args ...interface{}) *ScanCmd { + return redis.NewScanCmd(process, args...) +} + +type ClusterNode = redis.ClusterNode + +type ClusterSlot = redis.ClusterSlot + +type ClusterSlotsCmd = redis.ClusterSlotsCmd + +func NewClusterSlotsCmd(args ...interface{}) *ClusterSlotsCmd { + return redis.NewClusterSlotsCmd(args...) +} + +// GeoLocation is used with GeoAdd to add geospatial location. +type GeoLocation = redis.GeoLocation + +// GeoRadiusQuery is used with GeoRadius to query geospatial index. +type GeoRadiusQuery = redis.GeoRadiusQuery + +type GeoLocationCmd = redis.GeoLocationCmd + +func NewGeoLocationCmd(q *GeoRadiusQuery, args ...interface{}) *GeoLocationCmd { + return redis.NewGeoLocationCmd(q, args...) +} + +type GeoPos = redis.GeoPos + +type GeoPosCmd = redis.GeoPosCmd + +func NewGeoPosCmd(args ...interface{}) *GeoPosCmd { + return redis.NewGeoPosCmd(args...) +} + +type CommandInfo = redis.CommandInfo + +type CommandsInfoCmd = redis.CommandsInfoCmd + +func NewCommandsInfoCmd(args ...interface{}) *CommandsInfoCmd { + return redis.NewCommandsInfoCmd(args...) +} + +type Cmdable = redis.Cmdable + +type StatefulCmdable = redis.StatefulCmdable + +type Sort = redis.Sort + +type BitCount = redis.BitCount + +type XAddArgs = redis.XAddArgs + +type XReadArgs = redis.XReadArgs + +type XReadGroupArgs = redis.XReadGroupArgs + +type XPendingExtArgs = redis.XPendingExtArgs + +type XClaimArgs = redis.XClaimArgs + +// Z represents sorted set member. +type Z = redis.Z + +// ZWithKey represents sorted set member including the name of the key where it was popped. +type ZWithKey = redis.ZWithKey + +// ZStore is used as an arg to ZInterStore and ZUnionStore. +type ZStore = redis.ZStore + +type ZRangeBy = redis.ZRangeBy + +// ScanIterator is used to incrementally iterate over a collection of elements. +// It's safe for concurrent use by multiple goroutines. +type ScanIterator = redis.ScanIterator + +// Limiter is the interface of a rate limiter or a circuit breaker. +type Limiter = redis.Limiter + +type Options = redis.Options + +// ParseURL parses an URL into Options that can be used to connect to Redis. +func ParseURL(redisURL string) (*Options, error) { + return redis.ParseURL(redisURL) +} + +// Pipeliner is an mechanism to realise Redis Pipeline technique. +// +// Pipelining is a technique to extremely speed up processing by packing +// operations to batches, send them at once to Redis and read a replies in a +// singe step. +// See https://redis.io/topics/pipelining +// +// Pay attention, that Pipeline is not a transaction, so you can get unexpected +// results in case of big pipelines and small read/write timeouts. +// Redis client has retransmission logic in case of timeouts, pipeline +// can be retransmitted and commands can be executed more then once. +// To avoid this: it is good idea to use reasonable bigger read/write timeouts +// depends of your batch size and/or use TxPipeline. +type Pipeliner = redis.Pipeliner + +// Pipeline implements pipelining as described in +// http://redis.io/topics/pipelining. It's safe for concurrent use +// by multiple goroutines. +type Pipeline = redis.Pipeline + +// PubSub implements Pub/Sub commands as described in +// http://redis.io/topics/pubsub. Message receiving is NOT safe +// for concurrent use by multiple goroutines. +// +// PubSub automatically reconnects to Redis Server and resubscribes +// to the channels in case of network errors. +type PubSub = redis.PubSub + +// Subscription received after a successful subscription to channel. +type Subscription = redis.Subscription + +// Message received as result of a PUBLISH command issued by another client. +type Message = redis.Message + +// Pong received as result of a PING command issued by another client. +type Pong = redis.Pong + +// Nil reply returned by Redis when key does not exist. +const Nil = redis.Nil + +func SetLogger(logger *log.Logger) { + redis.SetLogger(logger) +} + +type Hook = redis.Hook + +// Client is a Redis client representing a pool of zero or more +// underlying connections. It's safe for concurrent use by multiple +// goroutines. +type Client = redis.Client + +// NewClient returns a client to the Redis Server specified by Options. +func NewClient(opt *Options) *Client { + return redis.NewClient(opt) +} + +type PoolStats = redis.PoolStats + +// Conn is like Client, but its pool contains single connection. +type Conn = redis.Conn + +// NewCmdResult returns a Cmd initialised with val and err for testing +func NewCmdResult(val interface{}, err error) *Cmd { + return redis.NewCmdResult(val, err) +} + +// NewSliceResult returns a SliceCmd initialised with val and err for testing +func NewSliceResult(val []interface{}, err error) *SliceCmd { + return redis.NewSliceResult(val, err) +} + +// NewStatusResult returns a StatusCmd initialised with val and err for testing +func NewStatusResult(val string, err error) *StatusCmd { + return redis.NewStatusResult(val, err) +} + +// NewIntResult returns an IntCmd initialised with val and err for testing +func NewIntResult(val int64, err error) *IntCmd { + return redis.NewIntResult(val, err) +} + +// NewDurationResult returns a DurationCmd initialised with val and err for testing +func NewDurationResult(val time.Duration, err error) *DurationCmd { + return redis.NewDurationResult(val, err) +} + +// NewBoolResult returns a BoolCmd initialised with val and err for testing +func NewBoolResult(val bool, err error) *BoolCmd { + return redis.NewBoolResult(val, err) +} + +// NewStringResult returns a StringCmd initialised with val and err for testing +func NewStringResult(val string, err error) *StringCmd { + return redis.NewStringResult(val, err) +} + +// NewFloatResult returns a FloatCmd initialised with val and err for testing +func NewFloatResult(val float64, err error) *FloatCmd { + return redis.NewFloatResult(val, err) +} + +// NewStringSliceResult returns a StringSliceCmd initialised with val and err for testing +func NewStringSliceResult(val []string, err error) *StringSliceCmd { + return redis.NewStringSliceResult(val, err) +} + +// NewBoolSliceResult returns a BoolSliceCmd initialised with val and err for testing +func NewBoolSliceResult(val []bool, err error) *BoolSliceCmd { + return redis.NewBoolSliceResult(val, err) +} + +// NewStringStringMapResult returns a StringStringMapCmd initialised with val and err for testing +func NewStringStringMapResult(val map[string]string, err error) *StringStringMapCmd { + return redis.NewStringStringMapResult(val, err) +} + +// NewStringIntMapCmdResult returns a StringIntMapCmd initialised with val and err for testing +func NewStringIntMapCmdResult(val map[string]int64, err error) *StringIntMapCmd { + return redis.NewStringIntMapCmdResult(val, err) +} + +// NewZSliceCmdResult returns a ZSliceCmd initialised with val and err for testing +func NewZSliceCmdResult(val []Z, err error) *ZSliceCmd { + return redis.NewZSliceCmdResult(val, err) +} + +// NewZWithKeyCmdResult returns a NewZWithKeyCmd initialised with val and err for testing +func NewZWithKeyCmdResult(val *ZWithKey, err error) *ZWithKeyCmd { + return redis.NewZWithKeyCmdResult(val, err) +} + +// NewScanCmdResult returns a ScanCmd initialised with val and err for testing +func NewScanCmdResult(keys []string, cursor uint64, err error) *ScanCmd { + return redis.NewScanCmdResult(keys, cursor, err) +} + +// NewClusterSlotsCmdResult returns a ClusterSlotsCmd initialised with val and err for testing +func NewClusterSlotsCmdResult(val []ClusterSlot, err error) *ClusterSlotsCmd { + return redis.NewClusterSlotsCmdResult(val, err) +} + +// NewGeoLocationCmdResult returns a GeoLocationCmd initialised with val and err for testing +func NewGeoLocationCmdResult(val []GeoLocation, err error) *GeoLocationCmd { + return redis.NewGeoLocationCmdResult(val, err) +} + +// NewCommandsInfoCmdResult returns a CommandsInfoCmd initialised with val and err for testing +func NewCommandsInfoCmdResult(val map[string]*CommandInfo, err error) *CommandsInfoCmd { + return redis.NewCommandsInfoCmdResult(val, err) +} + +// Hash is type of hash function used in consistent hash. +type Hash = redis.Hash + +// RingOptions are used to configure a ring client and should be +// passed to NewRing. +type RingOptions = redis.RingOptions + +// Ring is a Redis client that uses consistent hashing to distribute +// keys across multiple Redis servers (shards). It's safe for +// concurrent use by multiple goroutines. +// +// Ring monitors the state of each shard and removes dead shards from +// the ring. When a shard comes online it is added back to the ring. This +// gives you maximum availability and partition tolerance, but no +// consistency between different shards or even clients. Each client +// uses shards that are available to the client and does not do any +// coordination when shard state is changed. +// +// Ring should be used when you need multiple Redis servers for caching +// and can tolerate losing data when one of the servers dies. +// Otherwise you should use Redis Cluster. +type Ring = redis.Ring + +func NewRing(opt *RingOptions) *Ring { + return redis.NewRing(opt) +} + +type Script = redis.Script + +func NewScript(src string) *Script { + return redis.NewScript(src) +} + +// FailoverOptions are used to configure a failover client and should +// be passed to NewFailoverClient. +type FailoverOptions = redis.FailoverOptions + +// NewFailoverClient returns a Redis client that uses Redis Sentinel +// for automatic failover. It's safe for concurrent use by multiple +// goroutines. +func NewFailoverClient(failoverOpt *FailoverOptions) *Client { + return redis.NewFailoverClient(failoverOpt) +} + +type SentinelClient = redis.SentinelClient + +func NewSentinelClient(opt *Options) *SentinelClient { + return redis.NewSentinelClient(opt) +} + +// TxFailedErr transaction redis failed. +const TxFailedErr = redis.TxFailedErr + +// Tx implements Redis transactions as described in +// http://redis.io/topics/transactions. It's NOT safe for concurrent use +// by multiple goroutines, because Exec resets list of watched keys. +// If you don't need WATCH it is better to use Pipeline. +type Tx = redis.Tx + +// UniversalOptions information is required by UniversalClient to establish +// connections. +type UniversalOptions = redis.UniversalOptions + +// UniversalClient is an abstract client which - based on the provided options - +// can connect to either clusters, or sentinel-backed failover instances +// or simple single-instance servers. This can be useful for testing +// cluster-specific applications locally. +type UniversalClient = redis.UniversalClient + +// NewUniversalClient returns a new multi client. The type of client returned depends +// on the following three conditions: +// +// 1. if a MasterName is passed a sentinel-backed FailoverClient will be returned +// 2. if the number of Addrs is two or more, a ClusterClient will be returned +// 3. otherwise, a single-node redis Client will be returned. +func NewUniversalClient(opts *UniversalOptions) UniversalClient { + return redis.NewUniversalClient(opts) +} diff --git a/go.mod b/go.mod index 609f08b14..dca64493f 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,7 @@ -module github.com/go-redis/redis/v7 +module github.com/go-redis/redis -require ( - github.com/onsi/ginkgo v1.8.0 - github.com/onsi/gomega v1.5.0 -) +require github.com/go-redis/redis/v7 v7.0.0-beta.4 -go 1.11 +replace github.com/go-redis/redis/v7 => ./v7 + +go 1.13 diff --git a/.gitignore b/v7/.gitignore similarity index 100% rename from .gitignore rename to v7/.gitignore diff --git a/Makefile b/v7/Makefile similarity index 100% rename from Makefile rename to v7/Makefile diff --git a/bench_test.go b/v7/bench_test.go similarity index 100% rename from bench_test.go rename to v7/bench_test.go diff --git a/cluster.go b/v7/cluster.go similarity index 100% rename from cluster.go rename to v7/cluster.go diff --git a/cluster_commands.go b/v7/cluster_commands.go similarity index 100% rename from cluster_commands.go rename to v7/cluster_commands.go diff --git a/cluster_test.go b/v7/cluster_test.go similarity index 100% rename from cluster_test.go rename to v7/cluster_test.go diff --git a/command.go b/v7/command.go similarity index 100% rename from command.go rename to v7/command.go diff --git a/command_test.go b/v7/command_test.go similarity index 100% rename from command_test.go rename to v7/command_test.go diff --git a/commands.go b/v7/commands.go similarity index 100% rename from commands.go rename to v7/commands.go diff --git a/commands_test.go b/v7/commands_test.go similarity index 100% rename from commands_test.go rename to v7/commands_test.go diff --git a/doc.go b/v7/doc.go similarity index 100% rename from doc.go rename to v7/doc.go diff --git a/error.go b/v7/error.go similarity index 100% rename from error.go rename to v7/error.go diff --git a/example_instrumentation_test.go b/v7/example_instrumentation_test.go similarity index 100% rename from example_instrumentation_test.go rename to v7/example_instrumentation_test.go diff --git a/example_test.go b/v7/example_test.go similarity index 100% rename from example_test.go rename to v7/example_test.go diff --git a/export_test.go b/v7/export_test.go similarity index 100% rename from export_test.go rename to v7/export_test.go diff --git a/v7/go.mod b/v7/go.mod new file mode 100644 index 000000000..32a3ad7d5 --- /dev/null +++ b/v7/go.mod @@ -0,0 +1,8 @@ +module github.com/go-redis/redis/v7 + +require ( + github.com/onsi/ginkgo v1.8.0 + github.com/onsi/gomega v1.5.0 +) + +go 1.13 diff --git a/v7/go.sum b/v7/go.sum new file mode 100644 index 000000000..4fd21a150 --- /dev/null +++ b/v7/go.sum @@ -0,0 +1,27 @@ +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/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= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +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/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +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 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/consistenthash/consistenthash.go b/v7/internal/consistenthash/consistenthash.go similarity index 100% rename from internal/consistenthash/consistenthash.go rename to v7/internal/consistenthash/consistenthash.go diff --git a/internal/consistenthash/consistenthash_test.go b/v7/internal/consistenthash/consistenthash_test.go similarity index 100% rename from internal/consistenthash/consistenthash_test.go rename to v7/internal/consistenthash/consistenthash_test.go diff --git a/internal/hashtag/hashtag.go b/v7/internal/hashtag/hashtag.go similarity index 100% rename from internal/hashtag/hashtag.go rename to v7/internal/hashtag/hashtag.go diff --git a/internal/hashtag/hashtag_test.go b/v7/internal/hashtag/hashtag_test.go similarity index 100% rename from internal/hashtag/hashtag_test.go rename to v7/internal/hashtag/hashtag_test.go diff --git a/internal/internal.go b/v7/internal/internal.go similarity index 100% rename from internal/internal.go rename to v7/internal/internal.go diff --git a/internal/internal_test.go b/v7/internal/internal_test.go similarity index 100% rename from internal/internal_test.go rename to v7/internal/internal_test.go diff --git a/internal/log.go b/v7/internal/log.go similarity index 100% rename from internal/log.go rename to v7/internal/log.go diff --git a/internal/once.go b/v7/internal/once.go similarity index 100% rename from internal/once.go rename to v7/internal/once.go diff --git a/internal/pool/bench_test.go b/v7/internal/pool/bench_test.go similarity index 100% rename from internal/pool/bench_test.go rename to v7/internal/pool/bench_test.go diff --git a/internal/pool/conn.go b/v7/internal/pool/conn.go similarity index 100% rename from internal/pool/conn.go rename to v7/internal/pool/conn.go diff --git a/internal/pool/export_test.go b/v7/internal/pool/export_test.go similarity index 100% rename from internal/pool/export_test.go rename to v7/internal/pool/export_test.go diff --git a/internal/pool/main_test.go b/v7/internal/pool/main_test.go similarity index 100% rename from internal/pool/main_test.go rename to v7/internal/pool/main_test.go diff --git a/internal/pool/pool.go b/v7/internal/pool/pool.go similarity index 100% rename from internal/pool/pool.go rename to v7/internal/pool/pool.go diff --git a/internal/pool/pool_single.go b/v7/internal/pool/pool_single.go similarity index 100% rename from internal/pool/pool_single.go rename to v7/internal/pool/pool_single.go diff --git a/internal/pool/pool_sticky.go b/v7/internal/pool/pool_sticky.go similarity index 100% rename from internal/pool/pool_sticky.go rename to v7/internal/pool/pool_sticky.go diff --git a/internal/pool/pool_test.go b/v7/internal/pool/pool_test.go similarity index 100% rename from internal/pool/pool_test.go rename to v7/internal/pool/pool_test.go diff --git a/internal/proto/proto_test.go b/v7/internal/proto/proto_test.go similarity index 100% rename from internal/proto/proto_test.go rename to v7/internal/proto/proto_test.go diff --git a/internal/proto/reader.go b/v7/internal/proto/reader.go similarity index 100% rename from internal/proto/reader.go rename to v7/internal/proto/reader.go diff --git a/internal/proto/reader_test.go b/v7/internal/proto/reader_test.go similarity index 100% rename from internal/proto/reader_test.go rename to v7/internal/proto/reader_test.go diff --git a/internal/proto/scan.go b/v7/internal/proto/scan.go similarity index 100% rename from internal/proto/scan.go rename to v7/internal/proto/scan.go diff --git a/internal/proto/scan_test.go b/v7/internal/proto/scan_test.go similarity index 100% rename from internal/proto/scan_test.go rename to v7/internal/proto/scan_test.go diff --git a/internal/proto/write_buffer_test.go b/v7/internal/proto/write_buffer_test.go similarity index 100% rename from internal/proto/write_buffer_test.go rename to v7/internal/proto/write_buffer_test.go diff --git a/internal/proto/writer.go b/v7/internal/proto/writer.go similarity index 100% rename from internal/proto/writer.go rename to v7/internal/proto/writer.go diff --git a/internal/util.go b/v7/internal/util.go similarity index 100% rename from internal/util.go rename to v7/internal/util.go diff --git a/internal/util/safe.go b/v7/internal/util/safe.go similarity index 100% rename from internal/util/safe.go rename to v7/internal/util/safe.go diff --git a/internal/util/strconv.go b/v7/internal/util/strconv.go similarity index 100% rename from internal/util/strconv.go rename to v7/internal/util/strconv.go diff --git a/internal/util/unsafe.go b/v7/internal/util/unsafe.go similarity index 100% rename from internal/util/unsafe.go rename to v7/internal/util/unsafe.go diff --git a/internal_test.go b/v7/internal_test.go similarity index 100% rename from internal_test.go rename to v7/internal_test.go diff --git a/iterator.go b/v7/iterator.go similarity index 100% rename from iterator.go rename to v7/iterator.go diff --git a/iterator_test.go b/v7/iterator_test.go similarity index 100% rename from iterator_test.go rename to v7/iterator_test.go diff --git a/main_test.go b/v7/main_test.go similarity index 100% rename from main_test.go rename to v7/main_test.go diff --git a/options.go b/v7/options.go similarity index 100% rename from options.go rename to v7/options.go diff --git a/options_test.go b/v7/options_test.go similarity index 100% rename from options_test.go rename to v7/options_test.go diff --git a/pipeline.go b/v7/pipeline.go similarity index 100% rename from pipeline.go rename to v7/pipeline.go diff --git a/pipeline_test.go b/v7/pipeline_test.go similarity index 100% rename from pipeline_test.go rename to v7/pipeline_test.go diff --git a/pool_test.go b/v7/pool_test.go similarity index 100% rename from pool_test.go rename to v7/pool_test.go diff --git a/pubsub.go b/v7/pubsub.go similarity index 100% rename from pubsub.go rename to v7/pubsub.go diff --git a/pubsub_test.go b/v7/pubsub_test.go similarity index 100% rename from pubsub_test.go rename to v7/pubsub_test.go diff --git a/race_test.go b/v7/race_test.go similarity index 100% rename from race_test.go rename to v7/race_test.go diff --git a/redis.go b/v7/redis.go similarity index 100% rename from redis.go rename to v7/redis.go diff --git a/redis_test.go b/v7/redis_test.go similarity index 100% rename from redis_test.go rename to v7/redis_test.go diff --git a/result.go b/v7/result.go similarity index 100% rename from result.go rename to v7/result.go diff --git a/ring.go b/v7/ring.go similarity index 100% rename from ring.go rename to v7/ring.go diff --git a/ring_test.go b/v7/ring_test.go similarity index 100% rename from ring_test.go rename to v7/ring_test.go diff --git a/script.go b/v7/script.go similarity index 100% rename from script.go rename to v7/script.go diff --git a/sentinel.go b/v7/sentinel.go similarity index 100% rename from sentinel.go rename to v7/sentinel.go diff --git a/sentinel_test.go b/v7/sentinel_test.go similarity index 100% rename from sentinel_test.go rename to v7/sentinel_test.go diff --git a/testdata/redis.conf b/v7/testdata/redis.conf similarity index 100% rename from testdata/redis.conf rename to v7/testdata/redis.conf diff --git a/tx.go b/v7/tx.go similarity index 100% rename from tx.go rename to v7/tx.go diff --git a/tx_test.go b/v7/tx_test.go similarity index 100% rename from tx_test.go rename to v7/tx_test.go diff --git a/universal.go b/v7/universal.go similarity index 100% rename from universal.go rename to v7/universal.go diff --git a/universal_test.go b/v7/universal_test.go similarity index 100% rename from universal_test.go rename to v7/universal_test.go