Skip to content

chore: v9 #2111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ module:
go mod init github.com/my/repo
```

And then install go-redis/v8 (note _v8_ in the import; omitting it is a popular mistake):
If you are using **Redis 6**, install go-redis/**v8**:

```shell
go get github.com/go-redis/redis/v8
```

If you need **Redis 7** support, install go-redis/v9:
If you are using **Redis 7**, install **go-redis/v9**:

```shell
go get github.com/go-redis/redis/v9
Expand Down
2 changes: 1 addition & 1 deletion bench_decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"github.com/go-redis/redis/v8/internal/proto"
"github.com/go-redis/redis/v9/internal/proto"
)

var ctx = context.TODO()
Expand Down
2 changes: 1 addition & 1 deletion bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"
)

func benchmarkRedisClient(ctx context.Context, poolSize int) *redis.Client {
Expand Down
10 changes: 5 additions & 5 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"sync/atomic"
"time"

"github.com/go-redis/redis/v8/internal"
"github.com/go-redis/redis/v8/internal/hashtag"
"github.com/go-redis/redis/v8/internal/pool"
"github.com/go-redis/redis/v8/internal/proto"
"github.com/go-redis/redis/v8/internal/rand"
"github.com/go-redis/redis/v9/internal"
"github.com/go-redis/redis/v9/internal/hashtag"
"github.com/go-redis/redis/v9/internal/pool"
"github.com/go-redis/redis/v9/internal/proto"
"github.com/go-redis/redis/v9/internal/rand"
)

var errClusterNoNodes = fmt.Errorf("redis: cluster has no nodes")
Expand Down
4 changes: 2 additions & 2 deletions cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v8/internal/hashtag"
"github.com/go-redis/redis/v9"
"github.com/go-redis/redis/v9/internal/hashtag"
)

type clusterScenario struct {
Expand Down
8 changes: 4 additions & 4 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"strconv"
"time"

"github.com/go-redis/redis/v8/internal"
"github.com/go-redis/redis/v8/internal/hscan"
"github.com/go-redis/redis/v8/internal/proto"
"github.com/go-redis/redis/v8/internal/util"
"github.com/go-redis/redis/v9/internal"
"github.com/go-redis/redis/v9/internal/hscan"
"github.com/go-redis/redis/v9/internal/proto"
"github.com/go-redis/redis/v9/internal/util"
)

type Cmder interface {
Expand Down
2 changes: 1 addition & 1 deletion command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"time"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io"
"time"

"github.com/go-redis/redis/v8/internal"
"github.com/go-redis/redis/v9/internal"
)

// KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0,
Expand Down
4 changes: 2 additions & 2 deletions commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v8/internal/proto"
"github.com/go-redis/redis/v9"
"github.com/go-redis/redis/v9/internal/proto"
)

var _ = Describe("Commands", func() {
Expand Down
4 changes: 2 additions & 2 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net"
"strings"

"github.com/go-redis/redis/v8/internal/pool"
"github.com/go-redis/redis/v8/internal/proto"
"github.com/go-redis/redis/v9/internal/pool"
"github.com/go-redis/redis/v9/internal/proto"
)

// ErrClosed performs any operation on the closed client will return this error.
Expand Down
4 changes: 2 additions & 2 deletions example/del-keys-without-ttl/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module github.com/go-redis/redis/example/del-keys-without-ttl

go 1.14

replace github.com/go-redis/redis/v8 => ../..
replace github.com/go-redis/redis/v9 => ../..

require github.com/go-redis/redis/v8 v8.11.5
require github.com/go-redis/redis/v9 v8.11.5
2 changes: 1 addition & 1 deletion example/del-keys-without-ttl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"sync"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions example/hll/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module github.com/go-redis/redis/example/hll

go 1.14

replace github.com/go-redis/redis/v8 => ../..
replace github.com/go-redis/redis/v9 => ../..

require github.com/go-redis/redis/v8 v8.11.5
require github.com/go-redis/redis/v9 v8.11.5
2 changes: 1 addition & 1 deletion example/hll/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions example/lua-scripting/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module github.com/go-redis/redis/example/redis-bloom

go 1.14

replace github.com/go-redis/redis/v8 => ../..
replace github.com/go-redis/redis/v9 => ../..

require github.com/go-redis/redis/v8 v8.11.5
require github.com/go-redis/redis/v9 v8.11.5
2 changes: 1 addition & 1 deletion example/lua-scripting/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"
)

func main() {
Expand Down
8 changes: 3 additions & 5 deletions example/otel/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ module github.com/go-redis/redis/example/otel

go 1.14

replace github.com/go-redis/redis/v8 => ../..
replace github.com/go-redis/redis/v9 => ../..

replace github.com/go-redis/redis/extra/redisotel/v8 => ../../extra/redisotel
replace github.com/go-redis/redis/extra/redisotel/v9 => ../../extra/redisotel

replace github.com/go-redis/redis/extra/rediscmd/v8 => ../../extra/rediscmd
replace github.com/go-redis/redis/extra/rediscmd/v9 => ../../extra/rediscmd

require (
github.com/go-redis/redis/extra/redisotel/v8 v8.11.5
github.com/go-redis/redis/v8 v8.11.5
github.com/uptrace/opentelemetry-go-extra/otelplay v0.1.10
go.opentelemetry.io/otel v1.5.0
go.opentelemetry.io/otel/exporters/jaeger v1.5.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions example/otel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"go.opentelemetry.io/otel/codes"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"

"github.com/go-redis/redis/extra/redisotel/v8"
"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/extra/redisotel/v9"
"github.com/go-redis/redis/v9"
)

var tracer = otel.Tracer("redisexample")
Expand Down
4 changes: 2 additions & 2 deletions example/redis-bloom/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module github.com/go-redis/redis/example/redis-bloom

go 1.14

replace github.com/go-redis/redis/v8 => ../..
replace github.com/go-redis/redis/v9 => ../..

require github.com/go-redis/redis/v8 v8.11.5
require github.com/go-redis/redis/v9 v8.11.5
2 changes: 1 addition & 1 deletion example/redis-bloom/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"math/rand"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions example/scan-struct/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module github.com/go-redis/redis/example/scan-struct

go 1.14

replace github.com/go-redis/redis/v8 => ../..
replace github.com/go-redis/redis/v9 => ../..

require (
github.com/davecgh/go-spew v1.1.1
github.com/go-redis/redis/v8 v8.11.5
github.com/go-redis/redis/v9 v8.11.5
)
2 changes: 1 addition & 1 deletion example/scan-struct/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/davecgh/go-spew/spew"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"
)

type Model struct {
Expand Down
2 changes: 1 addition & 1 deletion example_instrumentation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"
)

type redisHook struct{}
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"time"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"net"
"strings"

"github.com/go-redis/redis/v8/internal"
"github.com/go-redis/redis/v8/internal/hashtag"
"github.com/go-redis/redis/v8/internal/pool"
"github.com/go-redis/redis/v9/internal"
"github.com/go-redis/redis/v9/internal/hashtag"
"github.com/go-redis/redis/v9/internal/pool"
)

func (c *baseClient) Pool() pool.Pooler {
Expand Down
8 changes: 3 additions & 5 deletions extra/rediscensus/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
module github.com/go-redis/redis/extra/rediscensus/v8
module github.com/go-redis/redis/extra/rediscensus/v9

go 1.15

replace github.com/go-redis/redis/v8 => ../..
replace github.com/go-redis/redis/v9 => ../..

replace github.com/go-redis/redis/extra/rediscmd/v8 => ../rediscmd
replace github.com/go-redis/redis/extra/rediscmd/v9 => ../rediscmd

require (
github.com/go-redis/redis/extra/rediscmd/v8 v8.11.5
github.com/go-redis/redis/v8 v8.11.5
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
go.opencensus.io v0.23.0
)
4 changes: 2 additions & 2 deletions extra/rediscensus/rediscensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"go.opencensus.io/trace"

"github.com/go-redis/redis/extra/rediscmd/v8"
"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/extra/rediscmd/v9"
"github.com/go-redis/redis/v9"
)

type TracingHook struct{}
Expand Down
5 changes: 2 additions & 3 deletions extra/rediscmd/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
module github.com/go-redis/redis/extra/rediscmd/v8
module github.com/go-redis/redis/extra/rediscmd/v9

go 1.15

replace github.com/go-redis/redis/v8 => ../..
replace github.com/go-redis/redis/v9 => ../..

require (
github.com/go-redis/redis/v8 v8.11.5
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.18.1
)
2 changes: 1 addition & 1 deletion extra/rediscmd/rediscmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"
)

func CmdString(cmd redis.Cmder) string {
Expand Down
6 changes: 3 additions & 3 deletions extra/redisotel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Installation

```bash
go get github.com/go-redis/redis/extra/redisotel/v8
go get github.com/go-redis/redis/extra/redisotel/v9
```

## Usage
Expand All @@ -12,8 +12,8 @@ Tracing is enabled by adding a hook:

```go
import (
"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/extra/redisotel"
"github.com/go-redis/redis/v9"
"github.com/go-redis/redis/extra/redisotel/v9"
)

rdb := rdb.NewClient(&rdb.Options{...})
Expand Down
8 changes: 3 additions & 5 deletions extra/redisotel/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
module github.com/go-redis/redis/extra/redisotel/v8
module github.com/go-redis/redis/extra/redisotel/v9

go 1.15

replace github.com/go-redis/redis/v8 => ../..
replace github.com/go-redis/redis/v9 => ../..

replace github.com/go-redis/redis/extra/rediscmd/v8 => ../rediscmd
replace github.com/go-redis/redis/extra/rediscmd/v9 => ../rediscmd

require (
github.com/go-redis/redis/extra/rediscmd/v8 v8.11.5
github.com/go-redis/redis/v8 v8.11.5
go.opentelemetry.io/otel v1.5.0
go.opentelemetry.io/otel/sdk v1.4.1
go.opentelemetry.io/otel/trace v1.5.0
Expand Down
4 changes: 2 additions & 2 deletions extra/redisotel/redisotel.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
"go.opentelemetry.io/otel/trace"

"github.com/go-redis/redis/extra/rediscmd/v8"
"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/extra/rediscmd/v9"
"github.com/go-redis/redis/v9"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions extra/redisotel/redisotel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/trace"

"github.com/go-redis/redis/extra/redisotel/v8"
"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/extra/redisotel/v9"
"github.com/go-redis/redis/v9"
)

func TestNew(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"context"
"time"

"github.com/go-redis/redis/v8"
"github.com/go-redis/redis/v9"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/go-redis/redis/v8
module github.com/go-redis/redis/v9

go 1.17

Expand Down
Loading