douhuiqi3855 2016-05-17 17:38
浏览 141
已采纳

Go是否具有Java中的Maven这样的打包系统? [关闭]

Does Go language have a packaging system like Maven in Java? I'm trying to see how to do dependency management and if there is a way to do it easily.

  • 写回答

1条回答 默认 最新

  • drtldt55533 2016-05-17 18:24
    关注

    Well, no, it does not. And it must be understood that go get is not a package manager.

    Still, there is a couple of things to learn:

    • This FAQ entry.

    • Since version 1.5, Go tooling has rudimentary support for "vendoring" — that is, packaging the required dependencies along with the project.

      The support is only in the form of treating a special directory named "vendor" at the top level of a project in a special way. The tooling does not provide any sort of managing the contents of that directory. Common approaches to do that include subtree merging and submodules supported by Git (and equivalent facilities of other VC systems) and external tooling (see below).

      This suport was made enabled by default in Go 1.6.

    • There's a host of 3rd-party tools implementing packaging for Go using various approaches to carry out this task.

      The seemingly complete list was pointed at by @AlexBrand but since it's hardly reasonable to try each solution there, I'll give an opinionated hint — based on my own lurking on the Go mailing list — to look at these tools: gb, glide, govendor, godep.

    • Please also consider reading this thread on the Go mailing list and the resources it links to.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 高价求中通快递查询接口
  • ¥15 解决一个加好友限制问题 或者有好的方案
  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?