我在 Windows 10 上使用 Go 并遇到问题。
我尝试使用 LiteIDE 运行一个基本的“Hello, world”Go 程序,但运行时它返回下一个错误:
C:/Program Files (x86)/Go/bin/go.exe build [C:/Users/MyUser/Desktop/Go_projects]
go: cannot find GOROOT directory: c:\go
Error: process exited with code 2.
很多人建议不要设置 GOROOT 路径变量,这意味着没有它 Go 应该可以正常工作,但 LiteIDE 没有。以防万一,我已将 GOPATH 设置为 C:\Program Files (x86)\Go\bin