duanpanhuo0618 2015-09-15 15:06
浏览 36

Godep本地包

I have a repository that looks like this:

src
|
|--myplace
   |--myprojectRepo
      |--someCmd
      |      main.go
      |--somePackage
      |      package.go

I'm trying to use Godeps to manage dependencies. However, when I run godep save inside of the someCmd folder, it copies not just the external code into the godep _workspace, but also the somePackage code into the godep _workspace.

Is there anyway to stop godep from copying code that is in the same repository into its _workspace?

The main ugliness that I see with this is that now there are two versions of somePackage.go. One in the somePackage directory and one in the godeps/_workspace... directory. And if I make a change to somePackage, I have to rerun godep inside of someCmd in order to have those changes pulled in.

  • 写回答

1条回答 默认 最新

  • dsnrixf6765 2015-09-16 12:44
    关注

    when I run godep save inside of the someCmd folder

    Godep will vendor everything that is not a sub-directory, it does not goes up to your repository's root.

    You have to run godep save ./... from the root of your project : it will save all external dependencies for your project in one place.

    As @JimB said, anyway people are gonna be pulling the whole repository at once, not sub-packages by sub-packages. And they should run godep restore from the repository's root too.

    评论

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改