天天看點

golang下載下傳和安裝下載下傳安裝和解除安裝指令介紹

下載下傳

官網:https://golang.org/dl/ 下載下傳對應系統的安裝包

安裝和解除安裝

官方安裝https://golang.org/doc/install指導。

tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz

export PATH=$PATH:/usr/local/go/bin      

移除環境變量配置和/usr/local/go目錄

Go wiki: https://github.com/golang/go/wiki

指令介紹

go <command> [arguments]      
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      

參考:

https://golang.org/cmd/go/