优秀的示例Go代码,使用标准库

huangapple go评论139阅读模式
英文:

Good example Go code with standard library usage

问题

对我来说,学习一门新语言时,其中一个令人望而生畏的事情就是标准库:它是否庞大?它包含了什么?它被多频繁地使用?它使用了哪些约定?

我一直在阅读Go教程和Effective Go,但我想看一些典型的示例代码,了解如何使用Go的标准库来编写完整(但不太复杂)的程序。

如果你有一个可以分享的示例项目,或者知道一个值得学习的项目,我将不胜感激!

英文:

One of the rather daunting things for me in picking up a new language is the standard library: is it large? What does it have in it? How often is it used? What conventions does it use?

I've been reading the Go tutorial and Effective Go, but I'd like to look at some idiomatic example code for complete (but not too complex) programs, and see how they make use of Go's standard library.

If you have a sample project sitting around you'd be willing to share, or you know of one that would be good to study, I'd appreciate it!

答案1

得分: 3

这是标准Go包的文档源代码

英文:

This is the documentation and source code for the standard Go packages.

答案2

得分: 2

随时浏览我的Tideland Common Go Library的软件包,它仍在不断增长中。网址是http://code.google.com/p/tideland-cgl/source/browse/。如果你在那里发现了一些不清楚的东西,可以问我。

英文:

Feel free to take a look into the - still growing - packages of my Tideland Common Go Library at http://code.google.com/p/tideland-cgl/source/browse/. So if you find something unclear there you can ask me.

答案3

得分: 0

每个包中的_test.go文件展示了使用该包的实际代码。例如,这个这个展示了如何使用archive/tar包。

英文:

_test.go files in each package show actual code using that package. For example, this and this show how to use archive/tar package.

huangapple
  • 本文由 发表于 2011年2月16日 15:35:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/5013705.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定