Files
the-way-to-go_ZH_CN/eBook/09.10.md
2015-03-16 23:16:54 +08:00

45 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 9.10 Go 的外部包和项目
现在我们知道如何使用 Go 以及它的标准库了,但是 Go 的生态要比这大的多。当着手自己的 Go 项目时,最好先查找下是否有些存在的第三方的包或者项目不能使用。大多数可以通过 go install 来进行安装。
第一个要去查看的地方是把项目用标签方式放在包展板上的 Go 项目网站
(运行在Google App Engine): [https://godashboard.appspot.com/project](https://godashboard.appspot.com/project)。这是一个手动维护的记录表。
通过类别进行分类,例如编译工具,压缩工具,数据结构,数据库存储,开发工具等,包含了 500 个以上的项目,列出了每个项目的名字,对其简短的描述和下载链接。这些可以在下面的代码仓库中找到,()中为仓库所使用的代码控制系统。
- on Google Code, e.g. https://code.google.com/p/goprotobuf (Mercurial(hg) or Subversion)
- on Github: e.g. https://github.com/kr/pretty.go (Git)
- on BitBucket, e.g. https://bitbucket.org/binet/igo/ (Mercurial(hg))
- on Launchpad, e.g. http://launchpad.net/mgo (Bazaar)
或者在其他的知名的代码分享网站,或者作者的网站。
在库中你也可以在通过管理员审核后,提交您自己的项目。
如果你想看到实际的项目状态可以看看 go 项目网站上的包在包展板上的标签http://godashboard.appspot.com/package。
它给出一个“安装最多的包”(本周和所有时间)和最近安装包的概述,根据下载包的外部开发者的数量。如果编译栏的状态显示ok,这表示这个包是可以通过最新版本Go来安装的。Go项目和Go包页面是没有关系的。如果一个包出现在一边就没有必要出现在另一边。
其他整理资源(部分内容重叠):
http://go-lang.cat-v.org/dev-utils (Developer-oriented)
http://go-lang.cat-v.org/go-code (Programs and applications)
http://go-lang.cat-v.org/library-bindings (Library bindings)
http://go-lang.cat-v.org/pure-go-libs (Pure Go libraries)
目前已经有许多非常好的外部库,如:
* MySQL(GoMySQL), PostgreSQL(go-pgsql), MongoDB (mgo, gomongo), CouchDB (couch-go), ODBC (godbcl), Redis (redis.go) and SQLite3 (gosqlite) database drivers
* SDL bindings
* Google's Protocal Buffers(goprotobuf)
* XML-RPC(go-xmlrpc)
* Twitter(twitterstream)
* OAuth libraries(GoAuth)
## 链接
- [目录](directory.md)
- 上一节:[通过 git 打包和安装](09.9.md)
- 下一节:[在 Go 程序中使用外部库](09.11.md)