]> Cypherpunks repositories - gostls13.git/commit
cmd/go: test whether alldocs.go is up to date
authorKevin Burke <kev@inburke.com>
Sat, 4 Aug 2018 17:01:54 +0000 (10:01 -0700)
committerKevin Burke <kev@inburke.com>
Mon, 20 Aug 2018 22:20:09 +0000 (22:20 +0000)
commitd169a429c5f9f1d20114e09fb131bc205b5a74f9
tree0b5188784a778f83bc87a0ef46dc9b5cbf38d380
parent477b7e5f4d143c2e8d68e9ef9d4db8ebe84a8489
cmd/go: test whether alldocs.go is up to date

A common error is to update the help text for a command in cmd/go, but
fail to update alldocs.go, which actually prints the help text for the
most common commands.

Add a test that the long-form documentation help text matches the
contents of alldocs.go, which will fail the build if we fail to keep
the documentation in sync. We can get fancier with the test output if
this is not sufficient.

Fixes golang/go#26735.

Change-Id: I2509765315eeb0f362633d812343d1324a01b73b
Reviewed-on: https://go-review.googlesource.com/127920
Run-TryBot: Kevin Burke <kev@inburke.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/help_test.go [new file with mode: 0644]
src/cmd/go/internal/help/help.go
src/cmd/go/main.go
src/cmd/go/mkalldocs.sh