Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
541 views
in Technique[技术] by (71.8m points)

visual studio code - VSCode go extension: could not import error


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should install Go somewhere else than C:Users<username>go as that is also default GOPATH. Having GOPATH (a directory where your user modules are installed) in same place as GOROOT (a directory where Go itself is installed) will cause a lot of different problems and confuse many tools.

Either completely remove current installation and re-install Go somewhere else (recommended) or point your GOPATH somewhere else.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...