HerokuにGoで作成したアプリをデプロイしようとしています.
パッケージ管理はdepを使用していて,公式ページを参考にしてGopkg.toml追記しました.
toml
1... 2[metadata.heroku] 3 root-package = "github.com/ryomak/circlebank"
createした後に
git push heroku masterをするとエラーが出ました.
remote: Compressing source files... done. remote: Building source: remote: remote: -----> Go app detected remote: -----> Fetching jq... done remote: -----> Fetching tq... done remote: !! The 'metadata.heroku["root-package"]' field is not specified in 'Gopkg.toml'. remote: !! root-package must be set to the root pacakage name used by your repository. remote: !! remote: !! For more details see: https://devcenter.heroku.com/articles/go-apps-with-dep#build-configuration remote: ! Push rejected, failed to compile Go app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to
プロジェクト構造は
. ├── Gopkg.lock ├── Gopkg.toml ├── Makefile ├── README.md ├── circle.go ├── cmd │ └── circle │ ├── circle │ └── circle.go ├── controller ├── model ├── public │ ├── img │ ├── index.html │ ├── is │ │ └── bundle.js │ └── stylesheet │ └── vendor
のようになっています.
実行する際は
go run cmd/circle/circle.go
で起動しています.
上記のpushのエラーの原因を教えていただきたいです.
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/01/22 09:52
2018/01/23 01:28
2018/01/23 10:10