<p>I'm writing a REST mobile backend in the standard library that uses Postgres (with database/sql). Does anybody have a good recommendation for folder structure?</p>
<hr/>**评论:**<br/><br/>fharding: <pre><p>I actually wrote an example project for this a while back! It's a todo REST API that uses Postgres. I used this same structure on a much bigger project with multiple collaborators and it's worked well. Let me know if you have any specific questions.</p>
<p><a href="https://github.com/fharding1/todo" rel="nofollow">https://github.com/fharding1/todo</a></p></pre>toorusan: <pre><p>A few that are commonly referenced:</p>
<p><a href="https://medium.com/statuscode/how-i-write-go-http-services-after-seven-years-37c208122831" rel="nofollow">https://medium.com/statuscode/how-i-write-go-http-services-after-seven-years-37c208122831</a></p>
<p><a href="https://medium.com/@benbjohnson/structuring-applications-in-go-3b04be4ff091" rel="nofollow">https://medium.com/@benbjohnson/structuring-applications-in-go-3b04be4ff091</a></p>
<p><a href="https://rakyll.org/style-packages/" rel="nofollow">https://rakyll.org/style-packages/</a></p>
<p><a href="http://jerf.org/iri/post/2929" rel="nofollow">http://jerf.org/iri/post/2929</a></p></pre>bxcodec: <pre><p>Try to learn about golang clean architecture, there so many example of it, and each of them is a good example. Just choose the best architecture to fit to your problem</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传