• Daniel Martí's avatar
    cmd/go: fix 'go vet -h' to print the right text · d7ab57ef
    Daniel Martí authored
    For the last two releases, its output has been the same as 'go -h'.
    
    The test and vet sub-commands share their flag logic via the cmdflag
    package, so fixing it there would mean a larger refactor. Moreover, the
    test subcommand handles its '-h' flag in a special way; that's #26999.
    
    For now, use a much less invasive fix, mirroring the special-casing of
    'test -h' to simply print vet's short usage text.
    
    Also add a regression test via a cmd/go test script.
    
    Fixes #26998.
    
    Change-Id: Ie6b866d98116a1bc5f84a204e1c9f1c2f6b48bff
    Reviewed-on: https://go-review.googlesource.com/129318
    Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRob Pike <r@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    d7ab57ef
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...