我试图设置我的 $GOPATH
变量在我的机器上运行一些示例代码:
$ smitego-example go run main.go
main.go:5:2: cannot find package "github.com/#GITHUB_USERNAME#/smitego" in any of:
/usr/local/go/src/pkg/github.com/#GITHUB_USERNAME#/smitego (from $GOROOT)
($GOPATH not set)
$ smitego-example export $GOPATH=$HOME
-bash: export: `=/Users/#OSX_USERNAME#': not a valid identifier
github.com/#GITHUB_USERNAME#/smitego/smitego.go
的内容:
package smitego
我如何设置我的 GOPATH
,使它始终和永远工作?