Skip to content

Commit

Permalink
gomod
Browse files Browse the repository at this point in the history
Fixes #366
  • Loading branch information
dcormier committed Apr 27, 2020
1 parent 2cca74e commit 1a47476
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 15 deletions.
9 changes: 7 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
----------------

Expand Down
2 changes: 1 addition & 1 deletion redis/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"testing"
"time"

"github.com/gomodule/redigo/redis"
"github.com/gomodule/redigo/redis/v3"
)

type testConn struct {
Expand Down
5 changes: 5 additions & 0 deletions redis/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/gomodule/redigo/redis/v3

go 1.13

require github.com/stretchr/testify v1.4.0
11 changes: 11 additions & 0 deletions redis/go.sum
Original file line number Diff line number Diff line change
@@ -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=
2 changes: 1 addition & 1 deletion redis/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"testing"
"time"

"github.com/gomodule/redigo/redis"
"github.com/gomodule/redigo/redis/v3"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion redis/pubsub_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion redis/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}) {
Expand Down
2 changes: 1 addition & 1 deletion redis/redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"testing"
"time"

"github.com/gomodule/redigo/redis"
"github.com/gomodule/redigo/redis/v3"
)

type timeoutTestConn int
Expand Down
2 changes: 1 addition & 1 deletion redis/reply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"
"time"

"github.com/gomodule/redigo/redis"
"github.com/gomodule/redigo/redis/v3"
)

type valueError struct {
Expand Down
2 changes: 1 addition & 1 deletion redis/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"
"time"

"github.com/gomodule/redigo/redis"
"github.com/gomodule/redigo/redis/v3"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion redis/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"testing"
"time"

"github.com/gomodule/redigo/redis"
"github.com/gomodule/redigo/redis/v3"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion redis/zpop_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion redisx/connmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions redisx/connmux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion redisx/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"errors"
"time"

"github.com/gomodule/redigo/redis"
"github.com/gomodule/redigo/redis/v3"
)

type testConn struct {
Expand Down
8 changes: 8 additions & 0 deletions redisx/go.mod
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions redisx/go.sum
Original file line number Diff line number Diff line change
@@ -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=

0 comments on commit 1a47476

Please sign in to comment.