vscode 需要设置一下gopath goroot等 上面配置已经很全了!

还有一点是如果是go mod模式 用一个包 引入后需要

go mod tidy

一下