Use the redigo or redis package in your application.
$ go get github.com/garyburd/redigo/redis
$ # OR
$ go get gopkg.in/redis.v5
Import the package of choice in your *.go files.
...
import "github.com/garyburd/redigo/redis"
// OR
import "gopkg.in/redis.v5"
...
Use a supported vendoring tool to record and save your dependencies.
$ govendor fetch github.com/garyburd/redigo/redis
$ # OR
$ govendor fetch gopkg.in/redis.v5
$ godep save
$ gb vendor fetch github.com/garyburd/redigo/redi
$ # OR
$ gb vendor fetch gopkg.in/redis.v5
Connect to Redis using the REDIS_URL
configuration variable:
...
c, err := redis.DialURL(os.Getenv("REDIS_URL"))
if err != nil {
// Handle error
}
defer c.Close()
...