官方下载地址 :https://code.visualstudio.com/git
若是不习惯英文能够安装中文插件github
Installing github.com/mdempsky/gocode FAILED Installing github.com/ramya-rao-a/go-outline FAILED Installing github.com/acroca/go-symbols FAILED Installing golang.org/x/tools/cmd/guru FAILED Installing golang.org/x/tools/cmd/gorename FAILED Installing github.com/stamblerre/gocode FAILED Installing github.com/ianthehat/godef FAILED Installing github.com/sqs/goreturns FAILED Installing golang.org/x/lint/golint FAILED
🍔"Win + r" 打开 "cmd", "Go 1.13" 以上版本默认启用 C:\Users\Administrator>go env -w GO111MODULE=on 🍔设置代理 C:\Users\Administrator>go env -w GOPROXY=http://goproxy.io,direct
ps : 点击设置选择 keyboard shortcuts,右边会弹出全部快捷键目录golang
如今咱们来建立第一个 go 程序来测试一下 :vim
🍓文件名 "go_hello.go" package main // 声明 main 包,代表当前是一个可执行程序 import "fmt" // 导入内置 fmt 包 func main() { // main函数,是程序执行的入口 fmt.Println("hello word shawn hahahah!") // 在终端打印 Hello World! }
使用终端(或者cmd)在 go 文件所在的目录下使用 go run [文件名]
来执行文件windows
PS E:\go> go run .\go_hello.go hello word shawn hahahah!
到如今第一个go程序就已经完成了, 接下来将进入真正的go学习之旅, 人生苦短, Le's Go编辑器