go环境安装
Posted k_u_n_h
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了go环境安装相关的知识,希望对你有一定的参考价值。
选择想要安装的版本:
http://golangtc.com/download
tar -zxf go1.8.linux-amd64.tar.gz
cp -R go/ /usr/local/
vi /etc/profile
GOROOT=/usr/local/go
GOPATH=$PATH:$GOROOT/bin
重新连接,输入命令:$GOPATH
Go is a tool for managing Go source code.
Usage:
go command [arguments]
The commands are:
build compile packages and dependencies
clean remove object files
doc show documentation for package or symbol
env print Go environment information
bug start a bug report
fix run go tool fix on packages
fmt run gofmt on package sources
generate generate Go files by processing source
get download and install packages and dependencies
install compile and install packages and dependencies
list list packages
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet run go tool vet on packages
Use "go help [command]" for more information about a command.
Additional help topics:
c calling between Go and C
buildmode description of build modes
filetype file types
gopath GOPATH environment variable
environment environment variables
importpath import path syntax
packages description of package lists
testflag description of testing flags
testfunc description of testing functions
Use "go help [topic]" for more information about that topic.
ok 安装完成
以上是关于go环境安装的主要内容,如果未能解决你的问题,请参考以下文章