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 · 3901 阅读 · 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 hello cd /hello go build 方法二: go env -w GO111MODULE=原创 2021-06-24 13:45:37 · 145 阅读 · 0 评论