diff options
author | Russ Cox <rsc@golang.org> | 2018-08-09 17:03:05 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2018-08-10 00:47:31 +0000 |
commit | 479da24aac375d4d61dd34733b4fda643141991e (patch) | |
tree | 0dae0111b8d6d6ccc3de96a7fd9b7884cb05b4ef /src/cmd/go/internal/modfetch/coderepo.go | |
parent | 9f5336d8d055e5768b5316bf6d32b1a5a705702e (diff) | |
download | go-479da24aac375d4d61dd34733b4fda643141991e.tar.gz go-479da24aac375d4d61dd34733b4fda643141991e.zip |
cmd/go: fix handling of gopkg.in/macaroon-bakery.v2-unstable
When we added v2.0.0+incompatible we generalized the API
enough to make it easy to also accepting these gopkg-specific
v2-unstable suffixes. Do that.
Fixes #23989.
Change-Id: Ieabed11a5250c2999d73450c10b20f4c645ad445
Reviewed-on: https://go-review.googlesource.com/128901
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/internal/modfetch/coderepo.go')
-rw-r--r-- | src/cmd/go/internal/modfetch/coderepo.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cmd/go/internal/modfetch/coderepo.go b/src/cmd/go/internal/modfetch/coderepo.go index c45833cbdd..9cf0e91150 100644 --- a/src/cmd/go/internal/modfetch/coderepo.go +++ b/src/cmd/go/internal/modfetch/coderepo.go @@ -86,6 +86,13 @@ func (r *codeRepo) ModulePath() string { } func (r *codeRepo) Versions(prefix string) ([]string, error) { + // Special case: gopkg.in/macaroon-bakery.v2-unstable + // does not use the v2 tags (those are for macaroon-bakery.v2). + // It has no possible tags at all. + if strings.HasPrefix(r.modPath, "gopkg.in/") && strings.HasSuffix(r.modPath, "-unstable") { + return nil, nil + } + p := prefix if r.codeDir != "" { p = r.codeDir + "/" + p |