-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/go: should go list -json
imply -e
?
#30755
Comments
Is that on (See previously #26218 (comment).) CC @jayconrod |
@bcmills For example
returns {
"Path": "github.com/golang/nonexistentrepo",
"Version": "latest",
"Error": "invalid version \"latest\""
} |
If the non-JSON output is going to
Does |
go list -json
imply -e
?
From a consistency standpoint, it makes sense to have I'm not sure about other go commands so it might be worth a scan. Thanks! |
Most people using |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
GO111MODULE=on go list -m -versions -json github.com/golang/nonexistentrepo@latest
What did you expect to see?
A valid json output with a clear error in the Error field. Something similar to when
go mod download
has an error as such:What did you see instead?
A non json output as such (modified):
The text was updated successfully, but these errors were encountered: