Golang包意外被移除。

huangapple go评论148阅读模式
英文:

Golang Package was removed unexpectedly

问题

我有一个使用了一些第三方包的 Golang 项目。今天,我想要对它进行升级,但其中一个包的 Git 仓库由于某种原因被作者删除了。我知道 Python 有 "pypi" 来管理所有的第三方包。是否有类似的平台可以保存这些包的副本,或者其他方法可以避免包被删除?

英文:

I have a golang project which imports some third-party packages. Today, i want to upgrade it but one of the packages's git repo has been removed by author for some reason. I know Python has "pypi" to manage all the third-party packages. Is there any platform like that can keep a copy of these packages or some other ways to avoid packages being removed?

答案1

得分: 1

最简单的方法是你直接fork这个git仓库,然后使用这个版本代替“live”版本。这样你就可以在升级之前测试兼容性,并确保你使用的依赖在你工作期间一直可用。

可能有一些平台提供这种服务,但总体来说,你也不能依赖它们。而且大多数平台更注重版本控制,保留存档只是一个(某种程度上的)副作用。

英文:

The simplest way to do this would be for you to simply fork the git repository, and use this version instead of the "live" one. This way you could test for compatibility before upgrades, etc, and ensure that your dependency is available for as long as you are working with it.

There may be platforms that provide this kind of service, but as a whole, you can't rely on them either. And the majority of them is more focused on versionning, keeping archives is only a (kind of) side-effect.

huangapple
  • 本文由 发表于 2014年6月20日 16:26:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/24322993.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定