28. Go - Terminal Commands
- go // lists go commands
- go env // lists go environment variables
- go env -w GOOS=linux // set go to compile to linux
- go fmt // formats the go code into convention standard format.
- go get // get packages from internet
Compiling/Building Code/Packages:
- go install //
For executables: builds/compiles the code and puts it in the GOPATH bin folder
For packages: builds/install the packages in GOPATH pkg folder
- go build // builds the code as an executable in the current directory.
- go clean // cleans residual build exes
Comments
Post a Comment