Is any blog with detailed description and examples of Go standard library exists? (except https://golang.org/pkg/)

agolangf · · 438 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hello! I wonder is someone created blog with detailed explanation of any Go&#39;s std lib unit? If no, i thing about to create this, for anyone who wants to start hacking with Go.</p> <hr/>**评论:**<br/><br/>allhatenocattle: <pre><p>Ben Johnson did this for a some stdlib packages. His posts are really good: <a href="https://medium.com/go-walkthrough" rel="nofollow">https://medium.com/go-walkthrough</a></p> <p>He covered:<br/> * io<br/> * bytes/strings<br/> * encoding<br/> * strconv<br/> * fmt </p> <p>edit: formatting</p></pre>joshuaboelter: <pre><p><a href="https://gobyexample.com" rel="nofollow">https://gobyexample.com</a> has a few</p></pre>lhxtx: <pre><p>You might want to submit some pull requests to add documentation then. </p></pre>dlsniper: <pre><p>The documentation should be helpful or should be improved if not. </p> <p>Don&#39;t make it harder for people to learn, instead make it easier by improving the quality of the existing documentation.</p></pre>scafander: <pre><p>Sure. But we don&#39;t live in utopia, so documentation can&#39;t be enough.</p></pre>dlsniper: <pre><p>But if the documentation is not good enough to explain what happens then the documentation needs to be fixed. So I don&#39;t understand what you hope to achieve here.</p></pre>scafander: <pre><p>All right, i explain in another key - not each person can understand documentation, so they need more detailed explanation.</p></pre>dlsniper: <pre><p>I&#39;m sorry, I just don&#39;t understand what problem you are trying to fix.</p></pre>wittywitwitty: <pre><p>I’m guessing he probably wants to see examples of code in use rather than the higher level explanations the documentation provides. I think The Go docs are pretty good but based on programming experience level I can see how some of the documentation could be confusing.</p></pre>dlsniper: <pre><p>If code examples are needed then the examples offered in the documentation, such as <a href="https://godoc.org/encoding/json#pkg-examples" rel="nofollow">https://godoc.org/encoding/json#pkg-examples</a> should be improved. But it&#39;s still part of the documentation and they should be fixed there in that case as that&#39;s the first place people go and check to see if there&#39;s any example of how to use the said code.</p></pre>ematap: <pre><p>I don&#39;t understand why this sub is being so hostile to newcomers and downvoting this redditor&#39;s comments. To me, it seems like they likely have little programming experience to begin with and perhaps the documentation doesn&#39;t do enough for them. The documentation is also likely fine for most experienced users. Suggesting that <em>they</em> improve the documents isn&#39;t helpful at all because they are looking to understand. How can you expect them to improve something they don&#39;t even understand?</p></pre>dlsniper: <pre><blockquote> <p>I don&#39;t understand why this sub is being so hostile to newcomers and downvoting this redditor&#39;s comments. </p> </blockquote> <p>Me neither. That being said, I did downvote your comment because you too didn&#39;t spent time to understand the question nor my reply so it produced a low quality reply. Here&#39;s why:</p> <blockquote> <p>To me, it seems like they likely have little programming experience to begin with and perhaps the documentation doesn&#39;t do enough for them. The documentation is also likely fine for most experienced users. Suggesting that they improve the documents isn&#39;t helpful at all because they are looking to understand. How can you expect them to improve something they don&#39;t even understand?</p> </blockquote> <p>To me the OP&#39;s question: </p> <blockquote> <p>Hello! I wonder is someone created blog with detailed explanation of any Go&#39;s std lib unit? If no, i thing about to create this, for anyone who wants to start hacking with Go.</p> </blockquote> <p>reads like this: is there any other documentation resource besides the golang.org/pkg (or godoc.org/-/go/)? If not, I want to create it.</p> <p>Now, if this person is a newbie, it is naive to think that they are capable of producing a good learning resource for others newbies to learn from. I cannot trust that someone that can&#39;t comprehend the current documentation / language will produce a correct documentation for it due to their inexperience and the pitfalls that the language has in certain areas.</p> <p>As such, asking them to contribute to the language by adding documentation / examples to the standard library means that they will have the chance to have their content reviewed by a lot more gophers, not to mention some of the best gophers in the world. In turn, having their contribution merged will result in them helping future newbies learn the language better as well as contributing to the language and its community.</p> <p>As for the documentation being fine for most experienced users, then having a newbie coming and saying: &#34;hey, this is something that&#39;s not easy to learn&#34; by opening an issue or sending a CL to fix the existing content / add new content is exactly what the Go team has been asking for years now.</p> <p>So yes, instead of wandering off and producing something on their own, they should be encouraged to speak up and contribute to the language.</p></pre>ematap: <pre><blockquote> <p>Now, if this person is a newbie, it is naive to think that they are capable of producing a good learning resource for others newbies to learn from. I cannot trust that someone that can&#39;t comprehend the current documentation / language will produce a correct documentation for it due to their inexperience and the pitfalls that the language has in certain areas.</p> </blockquote> <p>Maybe! I don&#39;t know what level of detail they are talking about or what they plan to accomplish. Perhaps they want to learn and blog at the same time or want to have a more personal project with a small group of people. Why does it even matter if they are capable of producing a good learning resource? Also, I wouldn&#39;t know how to contribute meaningfully if I was a newcomer myself and would find suggestions that I make a CL to improve the documentation pretty intimidating.</p></pre>tv64738: <pre><p>Not a blog but you might benefit from the book <a href="http://gopl.io/" rel="nofollow">http://gopl.io/</a></p></pre>wemgl: <pre><p>Came here to post this link. I&#39;ve read this book and it&#39;s fantastic. I don&#39;t think any blog post can possibly get to the level of detail, and include the amount of examples and exercises, to do learning Go justice.</p></pre>epiris: <pre><p>Go is the same as the standard library of all other languages. They all provide API documentation, most include at least some examples. Go has examples and documentation built in to the tool chain so I think it’s one of the higher quality experiences out there. Quality is relative though so it may come up short at times for people, when it does they just research the problem.</p> <p>That said it sounds like you are interested in writing about Go, so I think you should do just that. But if your looking for feedback on <em>what</em> to write about I don’t think any individual package in the stdlib stands out enough to need supplementary coverage. At the API level the documentation is really good. But other than to support the current packages examples, package documentation doesn’t span across multiple packages to solve more general problems. So it can be a bit overwhelming to do something that may be trivial like read xml from a file and write json to another. You are introduced head first into a foreign (but awesome) concept like interfaces by io pkg and marshal interfaces, struct tags, slice caveats and all basic control flow at once. So if you were wanting to write in genuine service to other gophers I believe making testable examples that solve larger problems that may require more than one nuanced stdlib package would be helpful.</p></pre>

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

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