diff options
author | Bryan C. Mills <bcmills@google.com> | 2020-02-24 09:21:04 -0500 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2020-02-24 19:06:40 +0000 |
commit | 78a608d785215364d16459c35a14690784438b0e (patch) | |
tree | 415d30ff52f4a3e860b53b0b68db17e514bd5deb | |
parent | d243408ae5ec14131dfd83923d2c140325158c0d (diff) | |
download | go-78a608d785215364d16459c35a14690784438b0e.tar.gz go-78a608d785215364d16459c35a14690784438b0e.zip |
cmd/go/internal/modfetch: delete unused isVendoredPackage function
This function is apparently unused since CL 204917.
Updates #35290
Updates #37397
Change-Id: Id7f5f5d5176fdbd1c5c6227e81d0854ceafc3f12
Reviewed-on: https://go-review.googlesource.com/c/go/+/220640
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
-rw-r--r-- | src/cmd/go/internal/modfetch/coderepo.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/cmd/go/internal/modfetch/coderepo.go b/src/cmd/go/internal/modfetch/coderepo.go index d1d24a40c96..753f65b3de4 100644 --- a/src/cmd/go/internal/modfetch/coderepo.go +++ b/src/cmd/go/internal/modfetch/coderepo.go @@ -1012,28 +1012,3 @@ func hasPathPrefix(s, prefix string) bool { return s[len(prefix)] == '/' && s[:len(prefix)] == prefix } } - -func isVendoredPackage(name string) bool { - var i int - if strings.HasPrefix(name, "vendor/") { - i += len("vendor/") - } else if j := strings.Index(name, "/vendor/"); j >= 0 { - // This offset looks incorrect; this should probably be - // - // i = j + len("/vendor/") - // - // (See https://golang.org/issue/31562.) - // - // Unfortunately, we can't fix it without invalidating checksums. - // Fortunately, the error appears to be strictly conservative: we'll retain - // vendored packages that we should have pruned, but we won't prune - // non-vendored packages that we should have retained. - // - // Since this defect doesn't seem to break anything, it's not worth fixing - // for now. - i += len("/vendor/") - } else { - return false - } - return strings.Contains(name[i:], "/") -} |