]> Cypherpunks repositories - gostls13.git/commit
cmd/go: make 'go test -h' print two lines
authorDaniel Martí <mvdan@mvdan.cc>
Thu, 25 Oct 2018 12:42:46 +0000 (13:42 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 6 Nov 2018 20:28:48 +0000 (20:28 +0000)
commitca33f33b1420cf333c59c6458bb9bc8910c91ecb
tree1a287946c0b90a8033bb0d3aa35515c5a4287598
parent9c772522ea365be6a916d428a981969befedad7f
cmd/go: make 'go test -h' print two lines

Like every other command's -h flag. To achieve this, pass the command's
usage function to the cmdflag package, since that package is used by
multiple commands and cannot directly access *base.Command.

This also lets us get rid of testFlag1 and testFlag2, and instead have
contiguous raw strings for the test and testflag help docs.

Fixes #26999.

Change-Id: I2ebd66835ee61fa83270816a01fa312425224bb3
Reviewed-on: https://go-review.googlesource.com/c/144558
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/cmd/go/internal/cmdflag/flag.go
src/cmd/go/internal/test/test.go
src/cmd/go/internal/test/testflag.go
src/cmd/go/internal/vet/vet.go
src/cmd/go/internal/vet/vetflag.go
src/cmd/go/main.go
src/cmd/go/testdata/script/help.txt