我正在尝试设置$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
该如何设置它,使其始终有效?
/usr/bin/bash
通常/bin/bash
在Mac或Linux上。