英文:
How do I use godep with testing packages
问题
我刚刚开始第一次使用godep。当我运行godep save
时,Godeps.json
文件中没有包含我的单元测试所依赖的testify。
go get -t
命令可以获取到testify,我该如何告诉godep将我的测试依赖项包含进去呢?
英文:
I have just started using godep for the first time. When I ran godep save
, the Godeps.json
file did not include testify which is a dependency for my unit tests.
go get -t
would see testify, how do I tell godep to include my test dependencies?
答案1
得分: 3
godep
会自动保存测试依赖项。在我的情况下,测试位于内部包中,所以我只需要运行godep save ./...
而不是godep save
,然后testify会被正常找到。
英文:
godep
saves test dependencies automatically. In my case, the tests were in an inner package, so I only needed to run godep save ./...
instead of godep save
and testify was found as expected.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论