Tra*_*era 6 go visual-studio-code
跑完后...
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.
小智 11
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
将代码写入终端并运行它。解决问题的简单方法。
已解决:转到 Visual Studio 代码(假设已安装) ctrl + shift + p 打开命令窗口类型
Go:当前的 GOPATH
这应该为您提供一个路径,创建一个名为 GOPATH 的系统环境变量,并将该路径添加到该变量中。
确保系统环境变量设置为:
GOPATH 设置(在我的情况下)为 C:\Users[username]\go
GOROOT 设置为 C:\go\
IDE 是 Visual Studio 代码。
| 归档时间: | 
 | 
| 查看次数: | 11141 次 | 
| 最近记录: |