在哪里可以找到golang模块?

时间:2019-04-11 06:49:33

标签: go module go-modules

我来自node.js生态系统。

Golang终于发布了其模块系统,我已经阅读了一些有关它的文章:

但是,在那之后,我仍然找不到像npmjs.com这样的地方可以找到可用的go模块。

4 个答案:

答案 0 :(得分:4)

没有用于Go模块的中央存储库。只要您遵循发布Go软件包的约定(请参阅PackagePublishing),无论您在何处发布,go工具都将能够获取您的软件包/模块。

为了发现Go宇宙中已经存在的东西,一个很好的起点是Awesome Go,这是精选的很棒的Go包/模块的列表。

答案 1 :(得分:4)

https://search.gocenter.io可用于搜索Go模块,了解有关模块版本受欢迎程度的更多信息,甚至可帮助模块作者与用户联系。这是自2019年1月底开始的GA,并且在全球范围内可用。

答案 2 :(得分:3)

还没有中央存储库 ,但请注意,模块支持在Go 1.12中仍处于试验阶段。默认情况下,它将在Go 1.13(计划于2019年8月)中启用。

签出The Go Blog: Go Modules in 2019

  

对于公开可用的模块,我们打算运行一个称为 notary 的服务,该服务遵循模块索引日志,下载新模块并以密码形式签署“版本V的模块M”形式的语句。公证服务将以可查询的Certificate Transparency样式tamper-proof log发布所有这些经过公证的哈希,以便任何人都可以验证公证的行为是否正确。该日志将用作go.sum的公共全局go get文件,在添加或更新依赖项时,go.sum可用于验证模块。

     

我们的目标是从Go 1.13开始,对<div> <p class="instructions"> Click on one of the fruits to go to its corresponding <br /> web page. </p> <p class="descbox2"> Clicking on the left Cherry will send you to a web page about how to grow Cherry trees. <br /><br /> Clicking the grapes will take you to a web page on how to grow Raisins. <br /><br /> Clicking the triangular Watermelon piece will send you to a web page for<br /> different ways to cut Watermelon. <br /><br /> Clicking the Orange will send you to a web page about how to grow Orange trees. <br /><br /> Clicking the Pineapple will take you to a web page about how to grow Pineapples from its top. <br /><br /> Clicking the Strawberry will take you to a web page for Froberg's Farm located<br /> in Alvin,TX to pick your own Strawberries. <br /><br /> If image links aren't working click the links below to go to the web pages used. <ul> <li><a href="https://www.starkbros.com/growing-guide/how-to-grow/fruit- trees/cherry-trees" Cherry Trees </a></li> </ul> </p> <img src="Images/fruitclipart.jpg" alt="Clipart of fruit" usemap="#fruits"> </div> 中尚不存在的公开可用模块,使用go命令检查经过公证的哈希值。

  

模块发现

     

最后,我们前面提到模块索引将使构建godoc.org之类的站点变得更加容易。我们将于2019年进行的部分工作将是godoc.org的重大改进,以使其对需要发现可用模块然后决定是否依赖给定模块的开发人员更加有用。

     

大图

     

此图显示了本文中模块源代码如何在设计中移动。

     

enter image description here

答案 3 :(得分:0)

我有同样的问题。如果您从内置软件包(https://golang.org/pkg/)开始,并且遵循了一些非显而易见的链接,那么最终您将在这里结束:

https://pkg.go.dev/