From: Jay Conrod Date: Fri, 3 Jan 2020 18:13:57 +0000 (-0500) Subject: cmd/go: clarify stderr behavior for 'go help mod download' X-Git-Tag: go1.14rc1~184 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6bcddae1af34d251b88fe134c1d3a8f4b4c7b0b6;p=gostls13.git cmd/go: clarify stderr behavior for 'go help mod download' Fixes #36297 Change-Id: I2623e9ee386644eddfa9a348ba368c5f1a81f893 Reviewed-on: https://go-review.googlesource.com/c/go/+/213134 Run-TryBot: Jay Conrod TryBot-Result: Gobot Gobot Reviewed-by: Michael Matloob --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index f91a04fb4c..342a947e11 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -1023,7 +1023,9 @@ // execution. The "go mod download" command is useful mainly for pre-filling // the local cache or to compute the answers for a Go module proxy. // -// By default, download reports errors to standard error but is otherwise silent. +// By default, download writes nothing to standard output. It may print progress +// messages and errors to standard error. +// // The -json flag causes download to print a sequence of JSON objects // to standard output, describing each downloaded module (or failure), // corresponding to this Go struct: diff --git a/src/cmd/go/internal/modcmd/download.go b/src/cmd/go/internal/modcmd/download.go index 5db0e46c64..7d5294dcd0 100644 --- a/src/cmd/go/internal/modcmd/download.go +++ b/src/cmd/go/internal/modcmd/download.go @@ -30,7 +30,9 @@ The go command will automatically download modules as needed during ordinary execution. The "go mod download" command is useful mainly for pre-filling the local cache or to compute the answers for a Go module proxy. -By default, download reports errors to standard error but is otherwise silent. +By default, download writes nothing to standard output. It may print progress +messages and errors to standard error. + The -json flag causes download to print a sequence of JSON objects to standard output, describing each downloaded module (or failure), corresponding to this Go struct: