Because gotest's args are mingled with the tests, it's
hard to get the usage message to print. This CL adds
explicit support for -help, spelled several different ways.
Gotest has special flags like -file that are somewhat
hidden otherwise.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5298052
if strings.HasPrefix(arg, "--") { // reduce two minuses to one
arg = arg[1:]
}
+ switch arg {
+ case "-?", "-h", "-help":
+ usage()
+ }
if arg == "" || arg[0] != '-' {
return
}