<p>Hey guys, check this out:
<a href="https://github.com/101Bas/tunein-mumble" rel="nofollow">https://github.com/101Bas/tunein-mumble</a></p>
<p>Obviously, it's a work in progress. What do you think about it?</p>
<p>;-)</p>
<hr/>**评论:**<br/><br/>kardianos: <pre><p>Regarding the organization:</p>
<p>Don't check-in your entire GOPATH directory. Do you see how code is organized when you "go get" it? put your code (and repo) in the "go get" path under GOPATH.</p>
<p>Regarding the code:</p>
<p>Looks decent. Consider only having two packages, a main package and a program package with an exposed API. Feel free to have multiple files in a single package. Move regex.MustCompile outside the func so it is only compiled once and if an error happens it happens on program init. You can group multiple vars into a single</p>
<p>var (</p>
<p>a string</p>
<p>b int</p>
<p>)</p>
<p>group.</p>
<p>"switch" is more powerful in go. Prefer switch over if else. Actually, almost never (ever?) use channied if-else in go. Just use switch.</p>
<p>Looks fun, happy coding!</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传