Recommendations for good Golang projects to learn from?

xuanbao · · 49 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<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="" rel="nofollow"></a></p></pre>SilentDanni: <pre><p>I usually follow these patterns when interacting with third party apis: <a href="" rel="nofollow"></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="">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="" rel="nofollow"></a> It is microservices architecture. </p></pre>shovelpost: <pre><ul> <li><a href="" rel="nofollow"></a></li> <li><a href="" rel="nofollow"></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="" rel="nofollow"></a></p> <p><a href="" rel="nofollow"></a></p> <p><a href="" rel="nofollow"></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="" rel="nofollow"></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="" rel="nofollow"></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="" rel="nofollow">A 4chan proxy server with some bells and whistles on top.</a> No tests yet!...</p></pre>The_Baconator69: <pre><p></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="" rel="nofollow"></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="" rel="nofollow"></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>
49 次点击  
加入收藏 微博
0 回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传