gopls requires a module at the root of your workspace.
You can work with multiple modules by opening each one as a workspace folder.
Improvements to this workflow will be coming soon, and you can learn more here:
https://github.com/golang/tools/blob/master/gopls/doc/workspace.md.
-
翻译:gopls 要求在你的 根工作控件 只能存在 一个模块,
-
你能够为每一个工作工件创建一个文件夹来实现多模块工作,
-
这个工作流程很快会得到改进,获取更多信息可以访问
settings.json设置里面添加
"gopls": {
"experimentalWorkspaceModule": true
}
说实话我还是解决不了