https://github.com/Microsoft/vscode-go/wiki/Go-with-VS-Code-FAQ-and-Troubleshooting
Q: Auto-completions stopped working. What do I do?
- Run
gocode close
in a terminal and try again. - If it still doesnt work, run
go get -u github.com/mdempsky/gocode
to update the tool. If you use thego.toolsGopath
setting, then set GOPATH to the value in that setting before runninggo get
so that the tool is installed/updated in the right location - If it still doesnt work, run
gocode -s -debug
in a terminal and try again. Results fromgocode
will show up in the terminal. If you see expected results in the terminal, but not in VS Code, log an issue in the vscode-go repo, else log an issue in the gocode repo.
原文:https://www.cnblogs.com/larryzeal/p/9270927.html