安装go基本环境
上go官网去找go的win下msi.exe:
https://golang.org/
配置go环境变量
三个环境变量:
path:;F:\programming\extra language\go\bin;
//执行命令用
GOPATH:F:\study\extra language\go\GOPATH
//下载依赖包用,类比Java的maven
GOROOT:F:\programming\extra language\go
//go的安装根目录
下载GoSublime插件
配置GoSublime插件
{
"env": {
"GOPATH": "F:/study/extra language/go/GOPATH",
"GOROOT": "F:/programming/extra language/go"
}
}
运行hello.go
package main
import "fmt"
func main() {
fmt.Println("Hello, World")
}
有疑问加站长微信联系(非本文作者)