Go
Commands
go list all= List all installed packages, standard library’s includedgo list std= List only packages from the standard librarygo test -bench=.= Run benchmarks after the tests..stands for current directory, obviouslygo env= List all Go variables
Go Modules
go mod init= creates a new module by initializing thego.modfilego list -m all= prints the current module’s dependenciesgo mod tidy= removes unused dependencies
Test Coverage
go test -cover= prints the percentage of coverage of your unit testsgo test -cover -coverprofile=c.out= save the coverage results in thec.outfile. With it it’s possible to have a html view of the tests’ coverage withgo tool cover -html=c.out -o coverage.html