# 附录
英文原版并没有包含附录部分,只有一个索引部分。中文版增加附录部分主要用于收录一些和本书相关的内容,比如英文原版的勘误(有些读者可能会对照中文和英文原阅读)、英文作者和中文译者、译文授权等内容。以后还可能会考虑增加一些习题解答相关的内容。
需要特别说明的是,中文版附录并没有包含英文原版的索引信息。因为英文原版的索引信息主要是记录每个索引所在的英文页面位置,而中文版是以GitBook方式组织的html网页形式,将英文页面位置转为章节位置可能会更合理,不过这个会涉及到繁琐的手工操作。如果大家有更好的建议,请告知我们。
### 附录A:[原文勘误](http://www.gopl.io/errata.html)
**p.9, ¶2:** for "can compared", read "can be compared". (Thanks to Antonio Macías Ojeda, 2015-10-22. Corrected in the second printing.)
**p.13:** As printed, the `gopl.io/ch1/lissajous` program is deterministic, not random. We've added the statement below to the downloadable program so that it prints a pseudo-random image each time it is run. (Thanks to Randall McPherson, 2015-10-19.)
`rand.Seed(time.Now().UTC().UnixNano())`
**p.15, ¶2:** For "inner loop", read "outer loop". (Thanks to Ralph Corderoy, 2015-11-28. Corrected in the third printing.)
**p.19, ¶2:** For "Go's libraries makes", read "Go's library makes". (Thanks to Victor Farazdagi, 2015-11-30. Corrected in the third printing.)
**p.40, ¶4:** For "value of the underlying type", read "value of an unnamed type with the same underlying type". (Thanks to Carlos Romero Brox, 2015-12-19.)
**p.40, ¶1:** The paragraph should end with a period, not a comma. (Thanks to Victor Farazdagi, 2015-11-30. Corrected in the third printing.)
**p.43, ¶3:** Import declarations are explained in §10.4, not §10.3. (Thanks to Peter Jurgensen, 2015-11-21. Corrected in the third printing.)
**p.48:**`f.ReadByte()` serves as an example of a reference to f, but `*os.File` has no such method. For "ReadByte", read "Stat", four times. (Thanks to Peter Olsen, 2016-01-06. Corrected in the third printing.)
**p.52, ¶2:** for "an synonym", read "a synonym", twice. (Corrected in the second printing.)
**p.52, ¶9:** for "The integer arithmetic operators", read "The arithmetic operators". (Thanks to Yoshiki Shibata, 2015-12-20.)
**p.68:** the table of UTF-8 encodings is missing a bit from each first byte. The corrected table is shown below. (Thanks to Akshay Kumar, 2015-11-02. Corrected in the second printing.)
~~~
0xxxxxxx runes 0−127 (ASCII)
110xxxxx 10xxxxxx 128−2047 (values <128 unused)
1110xxxx 10xxxxxx 10xxxxxx 2048−65535 (values <2048 unused)
11110xxx 10xxxxxx 10xxxxxx 10xxxxxx 65536−0x10ffff (other values unused)
~~~
**p.73, ¶1:** For "a exercise", read "an exercise". (Thanks to vrajmohan, 2015-12-28.)
**p.74:** the comment in `gopl.io/ch3/printints` should say `fmt.Sprint`, not `fmt.Sprintf`. (Corrected in the second printing.)
**p.75, ¶4:** for "%u", read "%o". (Thanks to William Hannish, 2015-12-21.)
**p.76:** the comment `// "time.Duration 5m0s` should have a closing double-quotation mark. (Corrected in the second printing.)
**p.79, ¶4:** "When an untyped constant is assigned to a variable, as in the first statement below, or appears on the right-hand side of a variable declaration with an explicit type, as in the other three statements, ..." has it backwards: the *first* statement is a declaration; the other three are assignments. (Thanks to Yoshiki Shibata, 2015-11-09. Corrected in the third printing.)
**p.112:** Exercise 4.11 calls for a "CRUD" (create, read, update, delete) tool for GitHub Issues. Since GitHub does not currently allow Issues to be deleted, for "delete", read "close". (Thanks to Yoshiki Shibata, 2016-01-18.)
**p.115:** The anchor element in `gopl.io/ch4/issueshtml`'s template is missing a closing `</a>` tag. (Thanks to Taj Khattra, 2016-01-19.)
**p.132, code display following ¶3:** the final comment should read: `// compile error: can't assign func(int, int) int to func(int) int` (Thanks to Toni Suter, 2015-11-21. Corrected in the third printing.)
**p.160, ¶4:**`For Get("item"))`, read `Get("item")`. (Thanks to Yoshiki Shibata, 2016-02-01.)
**p.166, ¶2:** for "way", read "a way". (Corrected in the third printing.)
**p.200, TestEval function:** the format string in the final call to t.Errorf should format test.env with %v, not %s. (Thanks to Mitsuteru Sawa, 2015-12-07. Corrected in the third printing.)
**p.222, Exercise 8.1:** The port numbers for `London` and `Tokyo` should be swapped in the final command to match the earlier commands. (Thanks to Kiyoshi Kamishima, 2016-01-08.)
**p.272, ¶3:** for "the request body", read "the response body". (Thanks to [曹春晖](https://github.com/cch123), 2016-01-19.)
**p.288, code display following ¶4:** In the import declaration, for `"database/mysql"`, read `"database/sql"`. (Thanks to Jose Colon Rodriguez, 2016-01-09.)
**p.347, Exercise 12.8:** for "like json.Marshal", read "like json.Unmarshal". (Thanks to [chai2010](https://github.com/chai2010), 2016-01-01.)
**p.362:** the `gopl.io/ch13/bzip` program does not comply with the [proposed rules for passing pointers between Go and C code](https://github.com/golang/proposal/blob/master/design/12416-cgo-pointers.md) because the C function `bz2compress` temporarily stores a Go pointer (in) into the Go heap (the `bz_stream` variable). The `bz_stream` variable should be allocated, and explicitly freed after the call to `BZ2_bzCompressEnd`, by C functions. (Thanks to Joe Tsai, 2015-11-18. Corrected in the third printing.)
### 附录B:作者/译者
### 英文作者
- **[Alan A. A. Donovan](https://github.com/adonovan)** is a member of [Google’s Go](https://golang.org/) team in New York. He holds computer science degrees from Cambridge and MIT and has been programming in industry since 1996. Since 2005, he has worked at Google on infrastructure projects and was the co-designer of its proprietary build system, [Blaze](http://bazel.io/). He has built many libraries and tools for static analysis of Go programs, including [oracle](https://godoc.org/golang.org/x/tools/oracle), [`godoc -analysis`](https://godoc.org/golang.org/x/tools/cmd/godoc), eg, and [gorename](https://godoc.org/golang.org/x/tools/cmd/gorename).
- **[Brian W. Kernighan](http://www.cs.princeton.edu/~bwk/)** is a professor in the Computer Science Department at Princeton University. He was a member of technical staff in the Computing Science Research Center at [Bell Labs](http://www.cs.bell-labs.com/) from 1969 until 2000, where he worked on languages and tools for [Unix](http://doc.cat-v.org/unix/). He is the co-author of several books, including [The C Programming Language, Second Edition (Prentice Hall, 1988)](http://s3-us-west-2.amazonaws.com/belllabs-microsite-dritchie/cbook/index.html), and [The Practice of Programming (Addison-Wesley, 1999)](https://en.wikipedia.org/wiki/The_Practice_of_Programming).
### 中文译者
| 中文译者 | 章节 |
|-----|-----|
| `chai2010 <chaishushan@gmail.com>` | 前言/第24章/第1013章 |
| `Xargin <cao1988228@163.com>` | 第1章/第6章/第8~9章 |
| `CrazySssst` | 第5章 |
| `foreversmart <njutree@gmail.com>` | 第7章 |
### 附录C:译文授权
除特别注明外, 本站内容均采用[知识共享-署名(CC-BY) 3.0协议](http://creativecommons.org/licenses/by/3.0/)授权, 代码遵循[Go项目的BSD协议](http://golang.org/LICENSE)授权.
[![Creative Commons License](https://box.kancloud.cn/2016-03-12_56e3b60bcd98b.png)](http://creativecommons.org/licenses/by-nc-sa/4.0/)
### 附录D:其它语言
下表是 [The Go Programming Language](http://www.gopl.io/) 其它语言版本:
| 语言 | 链接 | 时间 | 译者 | ISBN |
|-----|-----|-----|-----|-----|
| 中文 | [《Go语言圣经》](http://golang-china.github.io/gopl-zh/ "《Go语言圣经》") | 2016/2/1 | [chai2010](https://github.com/chai2010), [Xargin](https://github.com/cch123), [CrazySssst](https://github.com/CrazySssst), [foreversmart](https://github.com/foreversmart) | ? |
| 韩语 | [Acorn Publishing (Korea)](http://www.acornpub.co.kr/) | 2016 | Seung Lee | 9788960778320 |
| 俄语 | [Williams Publishing (Russia)](http://www.williamspublishing.com/) | 2016 | ? | 9785845920515 |
| 波兰语 | [Helion (Poland)](http://helion.pl/) | 2016 | ? | ? |
| 日语 | [Maruzen Publishing (Japan)](http://www.maruzen.co.jp/corp/en/services/publishing.html) | 2017 | Yoshiki Shibata | 9784621300251 |
| 葡萄牙语 | [Novatec Editora (Brazil)](http://novatec.com.br/) | 2017 | ? | ? |
| 中文简体 | [Pearson Education Asia](http://www.pearsonapac.com/) | 2017 | ? | ? |
| 中文繁体 | [Gotop Information (Taiwan)](http://www.gotop.com.tw/) | 2017 | ? | ? |
- Go语言程序设计
- Go语言圣经(中文版)
- 译者序
- 前言
- 第一章 入门
- 第二章 程序结构
- 第三章 基础数据类型
- 第四章 复合数据类型
- 第五章 函数
- 第六章 方法
- 第七章 接口
- 7.4. flag.Value接口
- 7.6. sort.Interface接口
- 7.7. http.Handler接口
- 第八章 Goroutines和Channels
- 第九章 基于共享变量的并发
- 9.2. sync.Mutex互斥锁
- 第十章 包和工具
- 第十一章 测试
- 第十二章 反射
- 12.2. reflect.Type和reflect.Value
- 12.5. 通过reflect.Value修改值
- 第13章 底层编程
- 13.1. unsafe.Sizeof, Alignof 和 Offsetof
- 附录