设为首页 加入收藏

TOP

1.go语言vscode集成开发环境搭建(二)
2023-08-26 21:10:19 】 浏览:119
Tags:1.go 语言 vscode 成开发
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语言的数据类型那点事》

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Go泛型简介 下一篇go-zero 是如何实现令牌桶限流的?

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目