From: Shenghou Ma Date: Wed, 18 Dec 2013 22:40:31 +0000 (-0500) Subject: cmd/go: show testflag help for "go test -h" X-Git-Tag: go1.3beta1~1156 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8606b976905525e489bb5f3a89aea23b52e42ed0;p=gostls13.git cmd/go: show testflag help for "go test -h" Fixes #6576. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/14502065 --- diff --git a/src/cmd/go/main.go b/src/cmd/go/main.go index df0cf1b3fd..7f4c75866c 100644 --- a/src/cmd/go/main.go +++ b/src/cmd/go/main.go @@ -238,6 +238,11 @@ func printUsage(w io.Writer) { } func usage() { + // special case "go test -h" + if len(os.Args) > 1 && os.Args[1] == "test" { + help([]string{"testflag"}) + os.Exit(2) + } printUsage(os.Stderr) os.Exit(2) }