解决报错 点击-文件-首选项-设置-拓展-Go-有一个在setting.json中编辑 添加 “gopls”: { “experimentalWorkspaceModule”: true } 然后保存就行了,报错问题解决