【发布时间】:2017-08-21 04:26:24
【问题描述】:
我正在关注 this tutorial 并尝试将一个简单的 Go web 应用程序部署到 Heroku,但在解决错误时遇到了困难:
remote: -----> Running: godep go install -tags heroku ./...
remote: main.go:7:3: cannot find package "github.com/russross/blackfriday" in any of:
remote: /app/tmp/cache/go1.3.3/go/src/pkg/github.com/russross/blackfriday (from $GOROOT)
remote: /tmp/build_1a204a91c152b49fe234bde14529ad27/.heroku/g/src/bitbucket.gotest/Godeps/_workspace/src/github.com/russross/blackfriday (from $GOPATH)
remote: /tmp/build_1a204a91c152b49fe234bde14529ad27/.heroku/g/src/github.com/russross/blackfriday
remote: godep: go exit status 1
remote:
remote: ! Push rejected, failed to compile Go app
我是 Go 新手,所以我假设我搞砸了我的包结构,但运行 $GOPATH/bin/godep go install 或 go install 工作正常。
这是我的 go 目录的(缩写)结构:
- 源
- 测试应用
- main.go
- github.com -codegangsta
- 俄罗斯
- 黑色星期五
谢谢。
【问题讨论】:
-
Go 版本 1.6 在这里回答:stackoverflow.com/questions/26076898/…