Skip to content
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

Unable to "go get" redis as it seems to point to v7 branch which is not available #1151

Closed
expectrox opened this issue Sep 4, 2019 · 4 comments

Comments

@expectrox
Copy link

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

@magmel48
Copy link

magmel48 commented Sep 5, 2019

same for me

@vmihailenco
Copy link
Collaborator

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.

@sid22
Copy link

sid22 commented Nov 6, 2019

I am using Go version go1.13.3 and still getting the same error.

@vmihailenco
Copy link
Collaborator

See https://github.com/golang/go/wiki/Modules#example - specifically you need to initialize a module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants