VSCode uses go.gopath i used for tools like go vet and go import... You will have to export the GOPATH on the integrate terminal with each use or set it in the bashrc... the integrate terminal is just a "clone" of the systems actual terminal. If you read the thread you provided you'll notice that what you want is a feature requests and not a current feature
I have a Go project that I'm maintaining with vscode.
I have set the
GOPATH for the project using the
go.gopath setting in vscode, and this seems to work just fine for the most part.
However, when I open the integrated terminal, and type
echo $GOPATH, the value shown is the value from
.bashrc not the value from
I need the integrated terminal to respect the GOPATH that's defined by vscode so when I run commands in the terminal, everything runs properly.
I've tried setting values in
terminal.integrated.shell.osx, but nothing seems to do what I want.
I want the intergrated terminal to understand the proper GOPATH when vscode is opened, and not have to manually set this each time I open an instance of the terminal.
I've found resources that seem like the should work, such as https://github.com/Microsoft/vscode/issues/14973 and many others, but nothing seems straight forward.