You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output was not well formed json. It contained a 'go: finding ...' message and the list of module objects was not wrapped in a comma delimited json list. Please click to expand example below.
The output was not well formed json. It contained a 'go: finding ...' message
AFAICT, that output is on stderr so it's fine IMO.
and the list of module objects was not wrapped in a comma delimited json list.
It's a stream of JSON objects? which is in line with JSON output from other sub-commands as well as being idiomatic(tm) and common which also makes it fine IMO.
Agree with @DisposaBoy's comment. This is working as intended.
Status messages are printed on stderr so the JSON output can be piped to tools and files separately. Errors are included in the JSON objects (in the Error field).
Printing a stream of JSON objects instead of a single list value is also expected. go list does this as well. Tools like jq work well with this format.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Well formed json output, please click to expand example below.
go mod download -json
OutputWhat did you see instead?
The output was not well formed json. It contained a 'go: finding ...' message and the list of module objects was not wrapped in a comma delimited json list. Please click to expand example below.
go mod download -json
OutputThe text was updated successfully, but these errors were encountered: