MarGo: Missing required environment variables: GOROOT GOPATH

使用sublime text运行go程序,出现如下错误:MarGo: Missing required environment variables: GOROOT GOPATH

See the Quirks section of USAGE.md for info

解决方法:在sublime->preferenct->package settings->gosublime->settings-user中添加

{
    "env": 
    {
        "GOPATH" : "your GOPATH settings",//此处为你的GOPATH路径,如我的为“/home/mygo”
        "GOROOT" : "your GOROOT settings"//此处为你的GOROOT路径,如我的为“/home/go”
    }
}
Relative Articles