我是 Go 新手,我正在尝试使用最少的文档来设置 Go 项目:https : //github.com/alphagov/metadata-api
我已经克隆了它,但是当我尝试时,go build我收到以下警告:
main.go:8:2: cannot find package "github.com/Sirupsen/logrus" in any of:
/usr/local/Cellar/go/1.3.3/libexec/src/pkg/github.com/Sirupsen/logrus (from $GOROOT)
/Users/me/go/src/github.com/Sirupsen/logrus (from $GOPATH)
main.go:14:2: cannot find package "github.com/alphagov/metadata-api/content_api" in any of:
/usr/local/Cellar/go/1.3.3/libexec/src/pkg/github.com/alphagov/metadata-api/content_api (from $GOROOT)
/Users/me/go/src/github.com/alphagov/metadata-api/content_api (from $GOPATH)
我猜这是因为我还没有安装 Go 等价的需求?
我GOPATH的设置:
metadata-api$ echo $GOPATH
/Users/me/go
Go 可执行文件在
metadata-ape$ echo $PATH
....:/Users/me/go/bin
我需要做什么来帮助 Go 找到这些包?
慕姐8265434
相关分类