I use IntelliJ IDEA as golang IDE, and system environment have already set GOPATH,But IDEA can't load it

前端 未结 6 999
眼角桃花
眼角桃花 2021-01-31 10:15

I use IntelliJ IDEA as golang IDE in Windows , and system environment have already set GOPATH,but IDEA can\'t load $GOPATH.

I use go get github.com/astaxie/beego

6条回答
  •  甜味超标
    2021-01-31 10:43

    In your system setting make sure all these enviroment variables are set in this way

    GOROOT=C:\Go
    GOBIN=%GOPATH%\bin
    PATH=%PATH%;c:\go\bin;%GOBIN%
    

    (If you have installed Go in c:\Go)

    In your user folder create a directory for Go, named for example goplayground
    Create another environment variable that points to this directory

    GOPATH=C:\Users\YOUR_USENAME\goplayground
    

    That's all. Now IntelliJ IDEA Go plugin should work correctly.

提交回复
热议问题