Go workspace issue: how to differ local packages from remote packages?
我的gopath指向
1 2 3 4 5 6 7 8 | # cd /home/go/src/marcio/somePackage; git pull --ff-only fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. package code.google.com/p/go.tools/astutil ... long list of dependencies ... imports marcio/somePackage: exit status 1 |
这非常令人困惑。 如何告诉
更新:
看起来Go工作区迫使您将依赖项与用户维护的代码混合在一起。 这看起来pre可危。 有时,有些人想擦拭未使用的垃圾程序包,并冒着擦错文件夹或未提交内容的风险,还有许多其他问题……是否有办法使用户维护的程序包与远程获取的依赖项分开?
例如,这将尝试更新github.com中的所有软件包:
1 | go get -u github.com/... |
但是总的来说,我会避免盲目更新所有内容,因为这会使跟踪依赖项破坏某些东西时更加困难,因为您当前不使用的无关项目也会对其依赖项进行更新。
更新答案:
尽管可以使用多个