Recommendations for good Golang projects to learn from?

xuanbao · · 1028 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hello <a href="/r/golang">r/golang</a>,</p> <p>What are some projects you would recommend to read and to learn from?</p> <p>In particular, I would be interested in examples of:</p> <ul> <li>creating a web API</li> <li>calling a 3rd party web API</li> <li>querying a relational database</li> <li>asynchronous jobs</li> <li>mapping to and from JSON</li> <li>validations</li> </ul> <p>I feel like I&#39;ve seen a lot of these covered by individual libraries and demonstrated in standalone code samples. However, I&#39;m hoping to find a project which covers many or perhaps even all of these in a unified and cohesive codebase.</p> <p>Any advice would be appreciated.</p> <p>Thanks in advance.</p> <hr/>**评论:**<br/><br/>Mteigers: <pre><p>Most of Hashicorps stuff. </p></pre>mhausenblas: <pre><p>Likely the best reference, for most of your requirements (besides the RDBMS stuff) is <a href="https://github.com/go-kit/kit" rel="nofollow">https://github.com/go-kit/kit</a></p></pre>SilentDanni: <pre><p>I usually follow these patterns when interacting with third party apis: <a href="https://github.com/google/go-github" rel="nofollow">https://github.com/google/go-github</a></p></pre>titpetric: <pre><p>If you&#39;d be interested, I can send you a free copy of 12 Factor Apps with Docker and Go, and API Foundations, it does cover most of the things which you&#39;re looking for. I didn&#39;t cover calling third party APIs specifically, or validations, but I might do it, it&#39;s a good idea! What do you say, free copy for some comments from your side?</p> <p>Edit: <a href="https://leanpub.com/b/golang-app-bundle">here&#39;s the bundle link for more info</a></p></pre>jonec00per: <pre><p>I&#39;d be interested for a free copy if you don&#39;t mind sharing with me. However, I&#39;m just getting started with golang.</p></pre>silentpayne1: <pre><p>I&#39;d be interested in that as well, just dabbing into go recently</p></pre>euneuber: <pre><p>I&#39;m also interested in your bundle.</p></pre>ishanjain28: <pre><p>I am interested in that bundle. I started learning golang 5 months ago, and like it so far. But looking for some help with designing and scaling large, complex APIs. </p></pre>Mittalmailbox: <pre><p>Check staffjoy code at <a href="https://github.com/Staffjoy/v2" rel="nofollow">https://github.com/Staffjoy/v2</a> It is microservices architecture. </p></pre>shovelpost: <pre><ul> <li><a href="https://github.com/upspin/upspin" rel="nofollow">https://github.com/upspin/upspin</a></li> <li><a href="https://github.com/golang/perf" rel="nofollow">https://github.com/golang/perf</a></li> </ul></pre>UnchartedFr: <pre><p>Hello </p> <p>I would recommend you to read those articles/projets on clean/hexagonal architecture before implementing any projects :)</p> <p><a href="http://manuel.kiessling.net/2012/09/28/applying-the-clean-architecture-to-go-applications/" rel="nofollow">http://manuel.kiessling.net/2012/09/28/applying-the-clean-architecture-to-go-applications/</a></p> <p><a href="https://github.com/CaptainCodeman/clean-go" rel="nofollow">https://github.com/CaptainCodeman/clean-go</a></p> <p><a href="https://geeks.uniplaces.com/putting-clean-architecture-into-practice-20c47d8c76de" rel="nofollow">https://geeks.uniplaces.com/putting-clean-architecture-into-practice-20c47d8c76de</a></p></pre>shovelpost: <pre><p>While one can learn a lot from the clean architecture, the implementation in those articles is full of Go anti-patterns so be careful.</p></pre>fern4lvarez: <pre><p>Hey</p> <p>I&#39;m the author of <a href="https://github.com/fern4lvarez/piladb" rel="nofollow">https://github.com/fern4lvarez/piladb</a>, a humble Go project that I&#39;ve been running for more an a year. I think it&#39;s a complete, yet simple piece of code that addresses many of your interests. It&#39;s easy to read, well modulated, with 100% of tests coverage and more or less well documented.</p> <p>If you have any question, please ask!</p></pre>hughbrien: <pre><p>Check out Todd McLeod. He has great YouTube videos and $15 course on Udemy : <a href="https://github.com/GoesToEleven?tab=repositories" rel="nofollow">https://github.com/GoesToEleven?tab=repositories</a></p></pre>mini_eggs: <pre><p>I&#39;ve done all of that in a recent project. My first Golang project so it&#39;s probably trash. Would love to get some feedback, though. </p> <p><a href="https://github.com/chan-lite/chan-lite-server" rel="nofollow">A 4chan proxy server with some bells and whistles on top.</a> No tests yet!...</p></pre>The_Baconator69: <pre><p>GitHub.com/drone/drone</p> <p>If you&#39;re unfamiliar with drone, it&#39;s an open source CI/CD tool. I&#39;ve been using it at work for a while now and it&#39;s pretty great :)</p></pre>sh41: <pre><p>Personally, I really like (disclaimer: my own) code at <a href="https://github.com/shurcooL/home" rel="nofollow">https://github.com/shurcooL/home</a>. It&#39;s the source code of my personal website.</p> <p>It&#39;s probably unique in some ways, but very practical and easy to maintain and develop for me. I have some services defined as interfaces that could be implemented via relational databases, but I choose to use simple filesystem-based implementations. They&#39;re simpler and sufficient for the current needs.</p></pre>Dummies102: <pre><p>kubernetes is probably the most well written large project I&#39;ve seen <a href="https://github.com/kubernetes/kubernetes/tree/master/pkg" rel="nofollow">https://github.com/kubernetes/kubernetes/tree/master/pkg</a></p></pre>firecat53: <pre><p>Docker and Syncthing.</p></pre>peterbourgon: <pre><p>Definitely, definitely, definitely not Docker.</p></pre>shovelpost: <pre><p>I agree, not docker but what would you recommend instead?</p></pre>titpetric: <pre><p>Well, I&#39;m guessing that a project with 4+ years of development will be overwhelming for anyone :D</p></pre>stone_henge: <pre><p>That it&#39;s overwhelming is IMO a mischaracterization of the actual problem. It&#39;s just not always very high quality or idiomatic code. I think that&#39;s understandable and sometimes excusable, but it does limit its use as a learning aid.</p></pre>

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

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