集成终端:更新环境变量

This is my first day using vscode with beego. I used IntelliJ otherwise, which has a setting to specify custom paths for GOPATH.

Vscode does not seem to have this option of allowing multiple GOPATHs, and I thought I could try to append GOPATH variable for all integrated terminal sessions.

I've added following to settings.json

"terminal.integrated.env.osx": {
    "GOPATH": "/Users/hk/go:/Users/hk/Documents/code/go/go-beego"
}

However, it has no effect on tasks.json

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
    {
        "label": "go: run beego",
        "type": "shell",
        "command": "echo \"gopath is $GOPATH\" | bee run portal"
    }
]
}

Output of tasks

gopath is /Users/hk/go
FATAL    ▶ 0001 No application 'portal'
found in your GOPATH. 
The terminal process terminated with exit code: 255

EDIT: The integrated terminal does not honour the following: "go.gopath": "/Users/hk/go:/Users/hk/Documents/code/go/go-beego",