Noopher: Is there any good resource for learning about Writer and Reader?

xuanbao · · 649 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>A noob gopher here. It seems that Reader and Writer are a huge part of golang language. Especially when it comes to terminal user input. However, coming from (very basic) Python, user interaction through terminal is giving me headaches. And the Reader/Writer interfaces are right in the middle of all of this.</p> <p>So far I&#39;ve been resorting to the monkey-see-monkey-do strategy, but I&#39;d really like to be able to understand what I&#39;m actually doing with those NewWriter calls. </p> <p>Is there a good resource or post to read up on that?</p> <p>Thank you in advance! </p> <hr/>**评论:**<br/><br/>DoomFrog666: <pre><p>If you look at their implementation you see they have just one method each. This is what makes them so powerful it&#39;s the best abstraction you can get.</p> <p>Familiarize yourself with the standard library and write small cli tools.</p> <p>One of the most important types in the standard library implementing Reader/Writer are *os.File and bytes.Buffer. Take also a look at io/ioutil and os.Stdin/out.</p></pre>

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

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