This cgo warning shows up when running "go test" in cmd/fix:
warning: no cgo types: exit status 1
(It may show up at other times too.)
Warnings belong on standard error, and while we're here,
make it say where it came from.
Change-Id: I3eaba592a219cc6abf2d584762374f9d6ec5135e
Reviewed-on: https://go-review.googlesource.com/c/go/+/240597
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
return nil
}()
if err != nil {
- fmt.Printf("warning: no cgo types: %s\n", err)
+ fmt.Fprintf(os.Stderr, "go fix: warning: no cgo types: %s\n", err)
}
}