我尝试了两种方法将goose包含在golang项目中,并且在heroku构建期间失败了。我首先尝试了这种方法:https://bitbucket.org/liamstask/goose/
我在vendor.json文件中添加了2个包:
{
"checksumSHA1": "rmNwGgFJAcDxUGF5yB/zqhQPxCA=",
"path": "bitbucket.org/liamstask/goose/cmd/goose",
"revision": "8488cc47d90c8a502b1c41a462a6d9cc8ee0a895",
"revisionTime": "2015-01-15T23:40:39Z"
},
{
"checksumSHA1": "jdqLDQw64kBjkU7LPK7C+Qwj7W8=",
"path": "bitbucket.org/liamstask/goose/lib/goose",
"revision": "8488cc47d90c8a502b1c41a462a6d9cc8ee0a895",
"revisionTime": "2015-01-15T23:40:39Z"
}
并收到错误:
can't load package: package bitbucket.org/liamstask/goose/cmd/goose: cannot find package "bitbucket.org/liamstask/goose/cmd/goose" in any of:
/app/tmp/cache/go1.7.5/go/src/bitbucket.org/liamstask/goose/cmd/goose (from $GOROOT)
/tmp/tmp.Pqgwxz8KyN/.go/src/bitbucket.org/liamstask/goose/cmd/goose (from $GOPATH)
! Push rejected, failed to compile Go app.
然后我找到了这些指示:https://bitbucket.org/liamstask/goose/issues/55/heroku-instructions-no-longer-works-on-go
并尝试更新我的供应商文件以包含:
"install": [
"./...",
"bitbucket.org/liamstask/goose/cmd/goose"
]
我仍然收到上面相同的错误消息。有什么想法吗?
编辑:这里是完整的错误消息:
-----> Go app detected
-----> Checking vendor/vendor.json file.
-----> Using go1.7.5
-----> Fetching any unsaved dependencies (govendor sync)
-----> Running: go install -v -tags heroku ./... vendor/bitbucket.org/liamstask/goose/cmd/goose
can't load package: package vendor/bitbucket.org/liamstask/goose/cmd/goose: cannot find package "vendor/bitbucket.org/liamstask/goose/\u200c\u200bcmd/goose" in any of:
/app/tmp/cache/go1.7.5/go/src/vendor/bitbucket.org/liamstask/goose/cmd/goose (from $GOROOT)
/tmp/tmp.IJd3qxVYqW/.go/src/vendor/bitbucket.org/liamstask/goose/cmd/goose (from $GOPATH)
! Push rejected, failed to compile Go app.
! Push failed