Where does go get install packages?

后端 未结 2 750
别跟我提以往
别跟我提以往 2020-12-29 20:29

I\'ve been given instructions to run go get which seems to succeed, but it\'s not clear to me where the package was installed to so

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-29 20:52

    I found the missing clue by running brew info go, which says:

    ==> Caveats
    A valid GOPATH is required to use the `go get` command.
    If $GOPATH is not specified, $HOME/go will be used by default:
      https://golang.org/doc/code.html#GOPATH
    

    From that I found the executable in question at $HOME/go/bin.

提交回复
热议问题