社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
国内镜像下载地址
https://golangtc.com/download
下载
go1.9.2.darwin-amd64.pkg安装
终端中输入go ,若出现下图即安装成功。
open ~/.bash_profile
GOROOT=/usr/local/go
PATH=$GOROOT/bin
GOROOT变量是下载解压的go目录的路径
source .bash_profile
import (
"fmt"
)
func main() {
fmt.Println("hello go!")
}
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!