Hi,
Problem
I have defined a workspace and havea GoPlugin installed with its GoSublime.sublime-settings
like
{
"env": {
"GOPATH": "C:\\go1.12.9.windows-amd64\\gopath;D:\\MyWork\\xyz",
"GOROOT": "C:\\go1.12.9.windows-amd64\\go"
}
}
which works, … BUT due to project differences I want GOPATH to differ for each project.
I searched a lot of official docs, and this blog comes close to what am asking but the solution is lost in some chatter
I tried, (and please also tell me why something like this cant work):
In my <project>.sublime-project
:
...
"settings":
{
"env":
{
"GOPATH": "C:\\go1.12.9.windows-amd64\\gopath;D:\\MyWork\\xyz",
"GOROOT": "C:\\go1.12.9.windows-amd64\\go"
}
},
"build_systems":
[
{
"name": "Update GO Path",
"shell_cmd": "SET GOPATH=%GOPATH%;D:\\MyWork\\xyz"
}
]
...
Side Note: Placing Windows environment variables instead of absolute paths also fails. Thats another question in itself.