[Q] GOPATH set to GOROOT has no effect?
//===
http://golang.org/cmd/go/#hdr-GOPATH_environment_variable
"""...
The Go binary distributions assume they will be installed in /usr/local/go (or c:\Go under Windows),
but it is possible to install them in a different location.
If you do this, you will need to set the GOROOT environment variable
to that directory when using the Go tools.
For example, if you installed Go to your home directory you should
add the following commands to $HOME/.profile:
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
..."""
//===
http://stackoverflow.com/questions/7970390/what-should-be-the-values-of-gopath-and-goroot
http://golang.org/cmd/goinstall/
http://golang.org/doc/install.html
"""...
GOPATH may be set to a colon-separated list of paths inside which Go code, package objects, and executables may be found.
Set a GOPATH to use goinstall to build and install your own code and external libraries outside of the Go tree (and to avoid writing Makefiles).
... GOROOT The root of the Go tree, often $HOME/go. This defaults to the parent of the directory where all.bash is run. If you choose not to set $GOROOT, you must run gomake instead of make or gmake when developing Go programs using the conventional makefiles.
..."""
2015年3月20日 星期五
GOPATH or GOROOT
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言