golang下载和安装

你离开我真会死。 提交于 2019-12-30 13:59:35

下载

官网: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/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!