Formatting with go fmt
go fmt formats the source code and it’s enforced by the language so that we can focus on how our code should work rather than how our code should look.
This might seem a little weird at first especially if you’re coming from a JavaScript or Python background, but frankly, it’s quite nice not to worry about linting rules.
Validating with go vet
go vet reports likely mistakes in our packages.
If you make a mistake in the syntax and then run go vet, it will notify you of the errors.
Environment Information with go env
go env prints all the Go environment information. We’ll learn about some of these build-time variables later.
Documentation with go doc
go doc shows documentation for a package or symbol. Here’s an example of viewing the fmt package:
Other Useful Commands
You can use thego help command to see what other commands are available: