Dependencies for Go app aren't installed through godep on Heroku

偶尔善良 提交于 2019-12-04 11:07:24

Yes, You do need to have all dependencies into your repository.

In fact when you run godep save ./... and you are using go 1.5 or greater, Godep will automatically put dependencies in a directory named vendor (inside root directory of your repo). You need to commit both Godep and vendor directory to your repository.

On side note while adding vendor directory use -f flag to add all files in it. It is needed as some files/directory might not be committed depending on your gitignore file and that will cause build failure in heroku. As a standard practice you can exeute following command to after adding dependencies using godep.

git add -f vendor/ Godep/

git commit -a -m "Vendorizing dependencies"

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!