Golang
Go语言编程
青山师
编码、架构、程序人生;此博客输出内容永久免费,长期分享JAVA开发技术
展开
-
Go环境异常问题go: go.mod file not found in current directory or any parent directory; see ‘go help modules
高版本go(1.17)执行时错误: go: go.mod file not found in current directory or any parent directory; see ‘go help modules’…解决:参考链接:https://blog.golang.org/go116-module-changes再1.16进行了module变更。所以高版本需要设置一下 :go env -w GO111MODULE=auto再次运行程序即可。...原创 2021-09-24 13:33:49 · 2817 阅读 · 1 评论 -
go语言开发环境
首次运行go程序,可能遇到以下错误:exec: “gcc”: executable file not found in %PATH%错误: 进程退出代码 2.这是因为运行go需要对应的编译器gcc。windows系统可以去:https://sourceforge.net/projects/mingw-w64/ 下载对应的MinGW版本,下载后安装即可。安装完成后,将安装后的目录的bin目录添加到系统环境变量,然后可以在命令行使用:gcc -v 来检查是否安装OK。...原创 2020-10-09 23:04:41 · 711 阅读 · 0 评论