enable additional analyses with staticcheck.
// Warning: This will significantly increase memory usage.
"staticcheck": false,
},
"go.languageServerFlags": [
"-rpc.trace", // for more detailed debug logging
"serve",
"--debug=localhost:6060", // to investigate memory usage, see profiles
],
"go.coverOnSave": true,
"go.coverOnSingleTest": true,
"go.coverOnSingleTestFile": true,
"go.coverShowCounts": true,
"go.testOnSave": false,
"go.testFlags": [],
"go.lintTool": "golint"
}
在main.go中写入以下程序
package main
func main(){
fmt.Println("Hello")
}
使用go mod 命令建立项目
go mod init github.com/Breeze0806/test
go mod tidy
go run main.go
如图test目录下多了go.mod,输出结果为Hello
本篇小结
本篇讨论了go语言的当前所有的集成开发环境,并且介绍了Visual Studio Code的windows操作系统下的go语言开发环境搭建,那么其他操作系统有没有办法搭建?有的,由于楼主使用的windows系统,其实unbuntu或者mac的搭建方式类似。
下篇预告
《go语言的数据类型那点事》