What packages/interfaces in the standard library should I study first?

polaris · · 413 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>io and io/ioutil and the reader/writer interfaces look like they come up often, what else?</p> <hr/>**评论:**<br/><br/>nerr: <pre><p>net/http for high level interfaces, net for high level abstractions over low level interfaces.</p></pre>hanmunjae: <pre><p>time: commonly used. Surprising uses of channels and goroutines.</p> <p>os/exec: how to run a subprocess.</p></pre>kkirsche: <pre><p>net/http, sync/waitgroup, time, and os </p></pre>epiris: <pre><p>If studying to learn, better to write a program that would need to use the parts you&#39;re interested in. In general the standard library can be simple to follow for pure Go packages, io related packages are examples of this (bytes, bufio, io, etc). But the std library itself has a lot more complexity in many areas than you will find in every day user space code for various (unavoidable) reasons. </p></pre>carsncode: <pre><p>Best to just find a project you can work on that will lead you to learn the packages first hand. If you want to look at a package as an example of good go, look at the io package. It defines the reader and writer interfaces, which are used throughout the other libraries, along with some implementations of them and usage of them, which help to exemplify the idea of interfaces in go and how small, simple interfaces can be very powerful.</p></pre>neopointer: <pre><p>Package io <a href="https://medium.com/go-walkthrough/go-walkthrough-io-package-8ac5e95a9fbd#.smdwi7h7b" rel="nofollow">https://medium.com/go-walkthrough/go-walkthrough-io-package-8ac5e95a9fbd#.smdwi7h7b</a></p></pre>

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

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