Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: 'go vet -h' produces help for go command #26998

0xmohit opened this issue Aug 15, 2018 · 3 comments


None yet
3 participants
Copy link

commented Aug 15, 2018

What version of Go are you using (go version)?

go version devel +c882f4b Tue Aug 14 20:40:15 2018 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes. Same result with go 1.10.2.

What operating system and processor architecture are you using (go env)?


What did you do?

go vet -h

What did you expect to see?

Something along the lines of:

usage: vet [-n] [-x] [build flags] [packages]

Vet runs the Go vet command on the packages named by the import paths.

For more about vet, see 'go doc cmd/vet'.
For more about specifying packages, see 'go help packages'.

To run the vet tool with specific options, run 'go tool vet'.

The -n flag prints commands that would be executed.
The -x flag prints commands as they are executed.

For more about build flags, see 'go help build'.

See also: go fmt, go fix.

What did you see instead?

Go is a tool for managing Go source code.


	go <command> [arguments]

The commands are:

	bug         start a bug report
	build       compile packages and dependencies
	clean       remove object files and cached files
	doc         show documentation for package or symbol
	env         print Go environment information
	fix         update packages to use new APIs
	fmt         gofmt (reformat) package sources
	generate    generate Go files by processing source
	get         download and install packages and dependencies
	install     compile and install packages and dependencies
	list        list packages or modules
	mod         module maintenance
	run         compile and run Go program
	test        test packages
	tool        run specified go tool
	version     print Go version
	vet         report likely mistakes in packages

Use "go help <command>" for more information about a command.

Additional help topics:

	buildmode   build modes
	c           calling between Go and C
	cache       build and test caching
	environment environment variables
	filetype    file types
	gopath      GOPATH environment variable
	gopath-get  legacy GOPATH go get
	goproxy     module proxy protocol
	importpath  import path syntax
	modules     modules, module versions, and more
	module-get  module-aware go get
	packages    package lists and patterns
	testflag    testing flags
	testfunc    testing functions

Use "go help <topic>" for more information about that topic.

This comment has been minimized.

Copy link
Contributor Author

commented Aug 15, 2018

This appears to be a side-effect of 62aeb77.


This comment has been minimized.

Copy link

commented Aug 15, 2018

Thanks for the report - doesn't seem like a regression since 1.10, and we're very late in the cycle, so I'm going to mark this for 1.12 for now.

@mvdan mvdan self-assigned this Aug 15, 2018

@mvdan mvdan added the NeedsFix label Aug 15, 2018

@mvdan mvdan added this to the Go1.12 milestone Aug 15, 2018

@mvdan mvdan changed the title cmd/vet: `go vet -h` produces help for go command cmd/go: 'go vet -h' produces help for go command Aug 15, 2018


This comment has been minimized.

Copy link

commented Aug 15, 2018

Change mentions this issue: cmd/go: fix 'go vet -h' to print the right text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.