@xxliixin1993
2016-07-19T08:26:24.000000Z
字数 435
阅读 1402
golang
参考:http://docscn.studygolang.com/doc/install/source
# git clone https://go.googlesource.com/go或者# git clone https://github.com/golang/go.git# cd go# git checkout master# cd src# ./all.bash然后将安装好的bin目录加入环境变量中
# tar -C /usr/local/ -xzf go1.6.3.linux-amd64.tar.gz# export PATH=$PATH:/usr/local/go/bin或者添加在/etc/profile中
首先创建一个hello.go的文件
package mainimport "fmt"func main() {fmt.Printf("hello, world\n")}
然后运行测试
# go run hello.go输出hello,world为成功