vscode go mod报错(萌新)

出现如下报错信息:

gopls was not able to find modules in your workspace.
When outside of GOPATH, gopls needs to know which modules you are working on.
You can fix this by opening your workspace to a folder inside a Go module, or
by using a go.work file to specify multiple modules.
See the documentation for more information on setting up your workspace:
https://github.com/golang/tools/blob/master/gopls/doc/workspace.md.

解决方案:

从单个项目路径进行,不从总目录下进入即可 

你可能感兴趣的:(vscode,golang,ide)