]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: print all warnings to stderr
authorNodir Turakulov <nodir@google.com>
Fri, 9 Oct 2015 18:59:58 +0000 (11:59 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 9 Oct 2015 20:42:30 +0000 (20:42 +0000)
All warnings in cmd/go are printed using fmt.Fprintf(os.Stderr...)
except one in test.go which is printed using log.Printf.
This is a minor inconsistency.

Change-Id: Ib470d318810b44b86e6cfaa77e9a556a5ad94069
Reviewed-on: https://go-review.googlesource.com/15657
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/test.go

index fa5ef3eb6571f6b017b19f00efa6de36e266b823..f72c2272f04dae3b6ceb8932066d1270919847ea 100644 (file)
@@ -13,7 +13,6 @@ import (
        "go/doc"
        "go/parser"
        "go/token"
-       "log"
        "os"
        "os/exec"
        "path"
@@ -439,7 +438,7 @@ func runTest(cmd *Command, args []string) {
                }
                for _, p := range testCoverPkgs {
                        if !used[p.ImportPath] {
-                               log.Printf("warning: no packages being tested depend on %s", p.ImportPath)
+                               fmt.Fprintf(os.Stderr, "warning: no packages being tested depend on %s\n", p.ImportPath)
                        }
                }