OK, finally, I found what is wrong in my environment:
OS X, .pkg go, GOROOT - "/usr/local/go"
GO, , GOROOT ~/.profile, "GOROOT =" /usr/local/go " ~/.profile, .
:
Go , /usr/local/go ( c:\Go Windows), . , GOROOT Go.
, Go , $HOME/.profile:
export GOROOT = $HOME/go export PATH = $PATH: $GOROOT/bin
, , , GOROOT ~/.profile .pkg, , .
~/.profile ():
export GOPATH = $HOME/projects/
export PATH = $PATH: $GOPATH/bin
: /project . http://golang.org/doc/code.html#tmp_2, , :
:
bin/
hello # command executable
pkg/
linux_amd64/
example/
newmath.a # package object
src/
example/
hello/
hello.go # command source
newmath/
sqrt.go # package source