doubo1711 2019-03-07 10:27
浏览 486
已采纳

bash终端和Goland IDE中的不同GOPATH

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.

  • 写回答

1条回答 默认 最新

  • doutan2456 2019-03-07 10:34
    关注

    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.

    enter image description here

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?