diff options
| author | Jonathan Amsterdam <jba@google.com> | 2021-08-20 18:17:42 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2021-08-23 19:38:24 +0000 |
| commit | 6529cda3ad13882e17d565d078ed058a8f299330 (patch) | |
| tree | a8da59654d8157c5a68dc84310b7fed77eb7439f /internal/stdlib/stdlib.go | |
| parent | 9b380c5fe42de54edb8ea256f518a34d54a0c2f5 (diff) | |
| download | go-x-pkgsite-6529cda3ad13882e17d565d078ed058a8f299330.tar.xz | |
internal/{fetch,worker,stdlib}: remove stdlib.Zip
For golang/go#47834
Change-Id: I81acf4fdc51a19352bfa7fb0cf9a2c22bb42a65b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/343966
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'internal/stdlib/stdlib.go')
| -rw-r--r-- | internal/stdlib/stdlib.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/internal/stdlib/stdlib.go b/internal/stdlib/stdlib.go index c1f7ffed..08fc4070 100644 --- a/internal/stdlib/stdlib.go +++ b/internal/stdlib/stdlib.go @@ -313,29 +313,6 @@ func ZipInfo(requestedVersion string) (resolvedVersion string, err error) { return resolvedVersion, nil } -// Zip creates a module zip representing the entire Go standard library at the -// given version (which must have been resolved with ZipInfo) and returns a -// reader to it. It also returns the time of the commit for that version. The -// zip file is in module form, with each path prefixed by ModuleName + "@" + -// version. -// -// Normally, Zip returns the resolved version it was passed. If the resolved -// version is version.Master, Zip returns a semantic version for the branch. -// -// Zip reads the standard library at the Go repository tag corresponding to to -// the given semantic version. -// -// Zip ignores go.mod files in the standard library, treating it as if it were a -// single module named "std" at the given version. -func Zip(requestedVersion string) (_ *zip.Reader, resolvedVersion string, commitTime time.Time, err error) { - // This code taken, with modifications, from - // https://github.com/shurcooL/play/blob/master/256/moduleproxy/std/std.go. - defer derrors.Wrap(&err, "stdlib.Zip(%q)", requestedVersion) - - zr, resolvedVersion, commitTime, _, err := zipInternal(requestedVersion) - return zr, resolvedVersion, commitTime, err -} - func zipInternal(requestedVersion string) (_ *zip.Reader, resolvedVersion string, commitTime time.Time, prefix string, err error) { var repo *git.Repository if UseTestData { |
