简体   繁体   中英

Different GOPATH in bash terminal and in Goland IDE

I've changed my GOPATH and in order to make the change persistent I've added the following line in my .bashrc file:

export GOPATH=$HOME/workspaces/go_projects

After restart, when I run go env in the bash terminal I see the correct path, but when I check in the GoLand IDE terminal I still see the old path.

Any ideas?

I'm running on on ubuntu 18.04.

You need to check the GOPATH settings for GoLand IDE.
Goto Settings > Go > GOPATH and check the settings.
Below is the snippet for my system.

在此处输入图片说明

Make sure you have selected "Use GOPATH that's defined in system environment".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM