go get github.com/something
package github.com/something: cannot download, $GOPATH not set. For more details see: go help gopath
Gopath 설정하기
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
영구적으로 저장하기 위해
vim ~/.bashrc
아래 내용 추가
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
저장 후
source ~/.bashrc
go언어 golang go get 오류 에러 gopath 설정