How to estimate the popularity of go packages?

agolangf · · 509 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi, </p> <p>I am a beginner with go, and I have hard time choosing which packages should I use for my web application. I wouldn&#39;t want to use package that are not popular, unmaintained, obsolete, etc.</p> <p>With node, you get download stats on npmjs.com, symfony have packagist that show download and votes.</p> <p>What central information point have golang?</p> <hr/>**评论:**<br/><br/>izztmzzt: <pre><p>Assuming you found it on guthub, check stats like number of contributors, stars, last commit, open issues, build status, unit test coverage, etc. That should give a clear enough picture.</p></pre>Faffenheim: <pre><p>Also how many other packages import the package (you can find this information in the package page on godoc.org, at the end of the page).</p></pre>bmarston: <pre><p>Hum, interesting!!</p> <p>What I cannot understand is that : <a href="https://godoc.org/?q=uuid" rel="nofollow">https://godoc.org/?q=uuid</a> , there is more than 3 packages with similar functions that are imported more than 300 times ... and 170 others ...</p> <p>What the point? Same for Web framework, still no clear winner.</p></pre>seufert: <pre><p>Why do you think there has to be a &#34;clear winner&#34;?</p></pre>hansdr: <pre><p>To save time when deciding which package to choose. If you&#39;re new to Go and confronted with a large array of packages that essentially solving the same problem, deciding which one to use can be hard and time consuming. If there&#39;s a &#34;clear winner&#34; then you can use the &#34;wisdom of the crowd&#34; to short-circuit that decision. </p> <p>That doesn&#39;t guarantee that you&#39;ll get the best package for your particular application, but it can certainly save you a lot of time. That&#39;s time that you can use to write actual code...</p></pre>zeiko_is_back: <pre><p>It&#39;s a false economy to choose packages based purely on popularity, I have seen my fair share of very popular packages which are total crap and riddled with vulnerabilities. You would be better served by evaluating the API they present and the code quality of the package than by how many other people download it.</p> <p>Perhaps the reason there is a &#34;clear winner&#34; so often on NPM is because most people don&#39;t actually evaluate packages at all, and everybody just piles on the most popular one, increasing it&#39;s popularity and meaning that the &#34;clear winner&#34; is pretty much chosen randomly.</p></pre>hansdr: <pre><p>I respectfully disagree. When faced with too much choice, in-depth analysis of every option becomes too costly. This is where less accurate techniques come in to cut the list down to a manageable size. Then you can look at your shortlist of options in more detail.</p> <p>Is the assumption that &#34;they must know something that I don&#39;t&#34; always right? No. As you said, a crap package might get a random boost. They do tend to drop down in the long run though, due to their poor quality.</p> <p>Could you miss the &#34;absolute best one?&#34; Absolutely. Could you end up choosing one that&#39;s no good? Yes. However, you&#39;ve got the time to go back and evaluate other ones if your initial choice ends up being no good.</p></pre>bmarston: <pre><p>No that&#39;s right, there is no need to be a clear winner. But I think it&#39;s the best for the language if the community can focus on some important and efficient packages instead. No need for hundreds of packages, 3-4 implementation could be sufficient most of the time.</p></pre>earthboundkid: <pre><p>I looked up UUID generation in Go the other day. The conclusion I remember coming to was that UUID turns out to be more or less trivial to generate yourself so you don&#39;t really need an external library if you don&#39;t want to use one. </p></pre>natefinch: <pre><p>I think that this is actually a good thing. It&#39;s not a popularity contest. The fact that there are different implementations is a good thing. They probably have different goals (one might be a simple and fast implementation, one might be a full implementation of the full RFC, etc).</p> <p>Go look at the repos, look to see how well they are maintained. That&#39;s probably more important than how many people import something. Maybe the repo hasn&#39;t been touched in 2 years, but everyone uses it... because everyone uses it.</p> <p>I like that Go makes you do a little more legwork when analyzing your dependencies. It makes you really decide what is best for your project, rather than just pulling in random dependencies with no thought for their impact on your project.</p></pre>teastburn: <pre><p>I&#39;ve been using <a href="https://golanglibs.com/" rel="nofollow">https://golanglibs.com/</a> and <a href="http://go-search.org" rel="nofollow">http://go-search.org</a> and liking them. I agree it&#39;s not a popularity contest but assuming other people have gone through the same library evaluation process, you can learn from their choices. Also, generally more popular libraries receive the most attention and updates.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

509 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传