![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
go
huangwy1991
PHP/go
展开
-
go学习-问题记录(开发环境)vscode报错gopls requires a module at the root of your workspace
@[TOC](go学习-问题记录(开发环境)vscode报错gopls requires a module at the root of your workspace)报错opls requires a module at the root of your workspace解决vscode 设置"experimentalWorkspaceModule": true原创 2021-06-24 14:13:23 · 3912 阅读 · 0 评论 -
go学习-问题记录(开发环境)go: cannot find main module; see ‘go help modules‘
go学习-问题记录-go: cannot find main module; see 'go help modules'报错解决报错执行 go build 编译时报错 go: cannot find main module; see 'go help modules'解决因为项目根目录下面没有go.mod文件方法一 :执行// 跳到根目录cd ../hello go mod init hellocd /hellogo build方法二:go env -w GO111MODULE=原创 2021-06-24 13:45:37 · 180 阅读 · 0 评论