Last login: Sat Feb 29 05:31:56 on console k@k-2 ~ % go Go is a tool for managing Go source code. Usage: 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 add dependencies to current module and install them 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 go.mod the go.mod file 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 module-auth module authentication using go.sum module-private module configuration for non-public modules packages package lists and patterns testflag testing flags testfunc testing functions Use "go help <topic>" for more information about that topic. k@k-2 ~ %
------------------------------------------------------------
go bug start a bug report
go build compile packages and dependencies
go clean remove object files and cached files
go doc show documentation for package or symbol
go env print Go environment information
go fix update packages to use new APIs
go fmt gofmt (reformat) package sources
go generate generate Go files by processing source
go get add dependencies to current module and install them
go install compile and install packages and dependencies
go list list packages or modules
go mod module maintenance
go run compile and run Go program
go test test packages
go tool run specified go tool
go version print Go version
go vet report likely mistakes in packages
Use "go help <command>" for more information about a command.
Additional help topics:
go buildmode build modes
go c calling between Go and C
go cache build and test caching
go environment environment variables
go filetype file types
go go.mod the go.mod file
go gopath GOPATH environment variable
go gopath-get legacy GOPATH go get
go goproxy module proxy protocol
go importpath import path syntax
go modules modules, module versions, and more
go module-get module-aware go get
go module-auth module authentication using go.sum
go module-private module configuration for non-public modules
go packages package lists and patterns
go testflag testing flags
go testfunc testing functions
-----------------------------------------------------
Commonly used commands go
go env environmental information for print Go language.
go run command can compile and run the command source files.
go get according to requirements and can be downloaded from the Internet or the actual situation update the specified code package and dependencies, and they build and install.
go build command is used to compile our source code file, or specify the code package as well as their dependencies.
go install compiled and installed for the specified code packets and their dependencies.
go clean command will delete some files and directories created when executing other commands.
go doc commands can be attached to print documents on the Go programming language entity. We can program the identifier of the entity to achieve the purpose of the document to view it as a parameter to the command.
go test command to the Go programming language for testing.
The role of go list command is to list the information specified code package.
Go all language source code files go fix package will specify the code in the old version of the code for the new revised version of the code.
go vet is a simple tool for checking the Go language source code static error.
go tool pprof command to access interactive content profile.
-----------------------------------------------------