github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/help.txt (about) 1 env GO111MODULE=off 2 3 # go help shows overview. 4 go help 5 stdout 'Go is a tool' 6 stdout 'bug.*start a bug report' 7 8 # go help bug shows usage for bug 9 go help bug 10 stdout 'usage: go bug' 11 stdout 'bug report' 12 13 # go bug help is an error (bug takes no arguments) 14 ! go bug help 15 stderr 'bug takes no arguments' 16 17 # go help mod shows mod subcommands 18 go help mod 19 stdout 'go mod <command>' 20 stdout tidy 21 22 # go help mod tidy explains tidy 23 go help mod tidy 24 stdout 'usage: go mod tidy' 25 26 # go mod help tidy does too 27 go mod help tidy 28 stdout 'usage: go mod tidy' 29 30 # go mod --help doesn't print help but at least suggests it. 31 ! go mod --help 32 stderr 'Run ''go help mod'' for usage.' 33 34 # Earlier versions of Go printed the same as 'go -h' here. 35 # Also make sure we print the short help line. 36 ! go vet -h 37 stderr 'usage: go vet' 38 stderr 'Run ''go help vet'' for details' 39 stderr 'Run ''go tool vet -help'' for the vet tool''s flags' 40 41 # Earlier versions of Go printed a large document here, instead of these two 42 # lines. 43 ! go test -h 44 stderr 'usage: go test' 45 stderr 'Run ''go help test'' and ''go help testflag'' for details.' 46 47 # go help get shows usage for get 48 go help get 49 stdout 'usage: go get' 50 stdout 'get when using GOPATH'