Saturday, 19 November 2016
Go Project Env Variable Setup
In ~/.bash_profile file:
export GOPATH=$HOME/IdeaProjects
export GOBIN=$GOPATH/bin
export PATH=$GOBIN:$PATH
Where GOPATH specifies the location of your workspace.
GOBIN is the install location of the executable output file after go install.
In Mac OS, you must create a bin file under GOPATH and set the GOBIN variable.
Otherwise, $ go install
go install: no install location for directory /Users/xxx/IdeaProjects/code outside GOPATH
Uninstall a package:
To uninstall a package was installed by go build
$sudo rm -rf /usr/local/go/src/path_package
Labels:
Golang
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment