跑完后...
go run main.go
我收到这个错误
go : The term 'go' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
已解决:转到 Visual Studio Code(假设已安装) ctrl + shift + p 打开命令窗口类型
Go:当前 GOPATH
这应该给你一个路径,创建一个名为 GOPATH 的系统环境变量,并将该路径添加到该变量中。
确保系统环境变量设置为:
GOPATH 设置(在我的例子中)为 C:\Users[用户名]\go
GOROOT 设置为 C:\go\
IDE 是 Visual Studio Code。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)