]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modfetch: return structured errors from proxy operations
authorBryan C. Mills <bcmills@google.com>
Mon, 24 Jun 2019 16:29:28 +0000 (12:29 -0400)
committerBryan C. Mills <bcmills@google.com>
Tue, 25 Jun 2019 13:27:07 +0000 (13:27 +0000)
commite28f0d92991e60ac3174b2ebf224f37be22c8fad
tree60314d8f8f87ad0ad415ea1a71f21b12abaf313a
parentdf901bce5ed71132f5837b513663fec889d82731
cmd/go/internal/modfetch: return structured errors from proxy operations

CL 181881 added structured error types for direct fetches.
Use those same structured errors to format proxy errors consistently.

Also ensure that an empty @v/list is treated as equivalent to the module
not existing at all.

Updates #27173
Updates #32715

Change-Id: I203fd8259bc4f28b3389745f1a1fde936b0fa24d
Reviewed-on: https://go-review.googlesource.com/c/go/+/183619
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modfetch/codehost/codehost.go
src/cmd/go/internal/modfetch/codehost/git.go
src/cmd/go/internal/modfetch/proxy.go
src/cmd/go/internal/modload/query.go
src/cmd/go/internal/module/module.go
src/cmd/go/testdata/script/mod_query_empty.txt [new file with mode: 0644]