diff options
author | Russ Cox <rsc@golang.org> | 2012-01-31 15:08:20 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2012-01-31 15:08:20 -0500 |
commit | 790eb01c24216783aee4756d8bdffff47e62c740 (patch) | |
tree | bc22411d301de548005b70fd236cfff06cb2b572 /src/cmd/go/run.go | |
parent | c59b90a308b5e52fafd9c61615666fa39cc9561e (diff) | |
download | go-790eb01c24216783aee4756d8bdffff47e62c740.tar.gz |
cmd/go: improvements
Print build errors to stderr during 'go run'.
Stream test output during 'go test' (no args). Fixes issue 2731.
Add go test -i to install test dependencies. Fixes issue 2685.
Fix data race in exitStatus. Fixes issue 2709.
Fix tool paths. Fixes issue 2817.
R=golang-dev, bradfitz, n13m3y3r, r
CC=golang-dev
http://codereview.appspot.com/5591045
Diffstat (limited to 'src/cmd/go/run.go')
-rw-r--r-- | src/cmd/go/run.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cmd/go/run.go b/src/cmd/go/run.go index 714cd4051..9d2c526fb 100644 --- a/src/cmd/go/run.go +++ b/src/cmd/go/run.go @@ -4,7 +4,11 @@ package main -import "strings" +import ( + "fmt" + "os" + "strings" +) var cmdRun = &Command{ UsageLine: "run [-a] [-n] [-x] gofiles... [arguments...]", @@ -28,9 +32,14 @@ func init() { cmdRun.Flag.BoolVar(&buildX, "x", false, "") } +func printStderr(args ...interface{}) (int, error) { + return fmt.Fprint(os.Stderr, args...) +} + func runRun(cmd *Command, args []string) { var b builder b.init() + b.print = printStderr i := 0 for i < len(args) && strings.HasSuffix(args[i], ".go") { i++ |