...

Text file src/cmd/go/testdata/script/help.txt

Documentation: cmd/go/testdata/script

     1env GO111MODULE=off
     2
     3# go help shows overview.
     4go help
     5stdout 'Go is a tool'
     6stdout 'bug.*start a bug report'
     7
     8# go help bug shows usage for bug
     9go help bug
    10stdout 'usage: go bug'
    11stdout 'bug report'
    12
    13# go bug help is an error (bug takes no arguments)
    14! go bug help
    15stderr 'bug takes no arguments'
    16
    17# go help mod shows mod subcommands
    18go help mod
    19stdout 'go mod <command>'
    20stdout tidy
    21
    22# go help mod tidy explains tidy
    23go help mod tidy
    24stdout 'usage: go mod tidy'
    25
    26# go mod help tidy does too
    27go mod help tidy
    28stdout 'usage: go mod tidy'
    29
    30# go mod --help doesn't print help but at least suggests it.
    31! go mod --help
    32stderr '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
    37stderr 'usage: go vet .*'
    38stderr 'Run ''go help vet'' for details.'
    39stderr 'Run ''go tool vet help'' for a full list of flags and analyzers.'
    40stderr 'Run ''go tool vet -help'' for an overview.'
    41
    42# Earlier versions of Go printed a large document here, instead of these two
    43# lines.
    44! go test -h
    45stderr 'usage: go test'
    46stderr 'Run ''go help test'' and ''go help testflag'' for details.'
    47
    48# go help get shows usage for get
    49go help get
    50stdout 'usage: go get'
    51stdout 'specific module versions'

View as plain text