Hi
I have a fairly stable project that was using this dependency :
go get github.com/go-redis/redis
Which no longer works as it seems the branch is not present in the repository :
RUN go get github.com/go-redis/redis
---> Running in 724ce4e0bc92
package github.com/go-redis/redis/v7/internal: cannot find package "github.com/go-redis/redis/v7/internal" in any of:
/usr/local/go/src/github.com/go-redis/redis/v7/internal (from $GOROOT)
/go/src/github.com/go-redis/redis/v7/internal (from $GOPATH)
package github.com/go-redis/redis/v7/internal/consistenthash: cannot find package "github.com/go-redis/redis/v7/internal/consistenthash" in any of:
/usr/local/go/src/github.com/go-redis/redis/v7/internal/consistenthash (from $GOROOT)
/go/src/github.com/go-redis/redis/v7/internal/consistenthash (from $GOPATH)
package github.com/go-redis/redis/v7/internal/hashtag: cannot find package "github.com/go-redis/redis/v7/internal/hashtag" in any of:
/usr/local/go/src/github.com/go-redis/redis/v7/internal/hashtag (from $GOROOT)
/go/src/github.com/go-redis/redis/v7/internal/hashtag (from $GOPATH)
package github.com/go-redis/redis/v7/internal/pool: cannot find package "github.com/go-redis/redis/v7/internal/pool" in any of:
/usr/local/go/src/github.com/go-redis/redis/v7/internal/pool (from $GOROOT)
/go/src/github.com/go-redis/redis/v7/internal/pool (from $GOPATH)
package github.com/go-redis/redis/v7/internal/proto: cannot find package "github.com/go-redis/redis/v7/internal/proto" in any of:
/usr/local/go/src/github.com/go-redis/redis/v7/internal/proto (from $GOROOT)
/go/src/github.com/go-redis/redis/v7/internal/proto (from $GOPATH)
package github.com/go-redis/redis/v7/internal/util: cannot find package "github.com/go-redis/redis/v7/internal/util" in any of:
/usr/local/go/src/github.com/go-redis/redis/v7/internal/util (from $GOROOT)
/go/src/github.com/go-redis/redis/v7/internal/util (from $GOPATH)
I can confirm I'm able to "get" other sources, so it is not a network issue. I have seen some code is pointing to v7:
https://github.com/go-redis/redis/search?q=%2Fv7%2F&unscoped_q=%2Fv7%2F
So I'm guessing the v7 branch was deleted from here :
https://github.com/go-redis/redis/branches/all
Please let me know if I'm wrongly assuming things, or if there is a workaround.
Thanks
Daniel
same for me
v7 uses Go modules where are enabled by default in Go 1.13 so I guess you are using older version. Anyway see https://github.com/golang/go/wiki/Modules or use v6 if your Go does not support Go modules.
I am using Go version go1.13.3 and still getting the same error.
See https://github.com/golang/go/wiki/Modules#example - specifically you need to initialize a module.
Most helpful comment
I am using Go version go1.13.3 and still getting the same error.