Switch, interfaces, channels and newbies.

agolangf · · 343 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I just recently saved myself a little bit of repetitive code and made my package easier to read by using one switch statement in place of 3 if else conditionals. It&#39;s almost embarrassing to admit- even as a newbie. </p> <p>How can I quicken the finer points of interfaces, methods and channels, bringing some understanding to idiomatic go. Is it simply experience from necessity - surely not.</p> <hr/>**评论:**<br/><br/>shovelpost: <pre><blockquote> <p>How can I quicken the finer points of interfaces, methods and channels, bringing some understanding to idiomatic go. </p> </blockquote> <p>Read <a href="https://golang.org/doc/effective_go.html" rel="nofollow">effective Go</a> many, many times.</p></pre>ops-man: <pre><p>OK. I&#39;ll give it a read. Thanks. </p></pre>

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

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