普通网友
2015-02-24 14:47
浏览 143
已采纳

如何在golang中对软件包进行版本控制?

I've read a whole bunch of articles and SO questions on importing 3rd party go packages which all seems straight forward, but what I don't understand is that none that I have read make any references to versioning. In Dartlang there's the pubspec file that defines your package including its version and its dependencies including their required versions. What if I do a go get github.com/gorilla/sessions and write my app then 6 months later I have to clear my directories and re get everything again, in which time that package has been update and broken backwards compatibility with my code that was using the older version?

图片转代码服务由CSDN问答提供 功能建议

我已经阅读了很多关于导入3rd party go软件包的文章和关于SO的问题,这些问题看起来都很简单, 但我不了解的是,我所阅读的内容均未提及版本控制。 在Dartlang中,有一个pubspec文件,该文件定义了您的程序包,包括其版本及其依赖项(包括其所需的版本)。 如果我开始获取github.com/gorilla/sessions </ code>并编写应用程序,那六个月后,我必须清除目录并重新获取所有内容,然后更新该软件包并 是否与使用旧版本的代码向后兼容?</ p> </ div>

2条回答 默认 最新

相关推荐 更多相似问题