Commit Graph

1243 Commits

Author SHA1 Message Date
Humbertzhang
a73e43ede3 修正翻译错误 (#601)
原文:
A Go string is thus a sequence of variable-width characters (each 1 to 4 bytes, see Ex. 4.6), contrary to strings in other languages as C++, Java or Python that are fixed-width (Java uses always 2 bytes).
因此改为 “Go 中的字符串里面的字符” 更合适。
2019-04-13 08:13:27 -04:00
Respawnz
6f01acd7b1 原书中指定的练习题序号错误 (#600) 2019-04-08 10:32:50 -04:00
Respawnz
fac86b6c15 少了两个空格 (#599) 2019-04-08 10:32:33 -04:00
Respawnz
7aae332065 翻译更正+原书勘误+译者注 (#598)
* 翻译更正+译者注

原文:concatenates the string with itself.
为了便于理解增加了译者注

* 原书此处也是11.9,但实际上指的是练习11.11

原书此处也是11.9,但实际上指的是练习11.11

* 此处英文版原书有误,应该是练习10.16和10.17

* 原书此处有误,因为方法无法同时使用命名过的返回值和未命名的返回值

会报错:Method specification has both named and unnamed return parameters '(x interface{}, error)'

* 补漏+易读性提升

A function which has a (one or more) parameter of an interface type can be called with a variable(此处译文中漏掉) whose type implements that interface. 
其**实参**可以是任何实现了该接口的类型的变量
2019-04-08 10:32:18 -04:00
perry14
d6af03c9d1 Update 14.2.md (#596)
Fix a mistake.
2019-04-08 10:31:38 -04:00
ziposcar
5f078f6da7 Update 14.9 别字与翻译建议 (#595) 2019-03-26 18:45:21 -04:00
Respawnz
0f0d0b0331 翻译修正 (#592)
* 翻译修正

 A new value is put in the highest cell which is empty (contains 0), on top: this is called push.

* Update 10.7.md

原文中的which此处可省略掉,译文更通顺
2019-03-26 18:45:07 -04:00
ziposcar
d403aa7d76 Update 14.2.md 专有名词翻译 (#594)
专有名词翻译
2019-03-26 18:44:39 -04:00
ziposcar
d9e411062d Update 11.14.md 翻译修改建议 (#593)
1. 修正一同位语从句的误翻,应该是机翻没看到(the fact that ... 同位语表示相同地位)。保留了之前译者的补充。
2. 一处专用词修正“入参”->“参数”(其实改成“形参”也行,但原文没体现也不是重点)。
3. 补充一个语义不明的地方,因为原文的 those 的指代作用比中文丰富单看直翻不好理解。
2019-03-26 18:44:23 -04:00
ziposcar
b42e2fea6f 9.8 目录树层级对齐小调整 (#590) 2019-03-20 23:54:26 -04:00
ziposcar
3450f43d69 9.4 错别字修正 用过 -> 通过 (#589) 2019-03-20 15:58:56 -04:00
wenjieyan
c0fa994c1a 关于16.10错误处理的一些见解 (#587)
* Update 16.10.md

* Update 16.10.md

* add Discussion_about_16.10.md

* Update 16.10.md

* 修复超链接

* 更新超链接
2019-03-20 15:58:34 -04:00
Respawnz
ac62eb795b 翻译修正 (#584)
* 翻译修正

ISAM -> IsAM 
Exercise 9.4: The function which does the test is contained in a package even 将测试所用的函数编写在 even 包里。

https://github.com/Unknwon/the-way-to-go_ZH_CN/blob/master/eBook/exercises/chapter_9/even/even.go
在练习源代码里也证实了这一点

* 修正我自己的pr

前文用的判断,后文应该也是判断,我的失误
2019-03-16 21:49:52 -04:00
燕睿涛
872c18fa42 Update 18.1.md (#585)
len([]int(str)) 修改为 len([]rune(str))
2019-03-16 21:49:31 -04:00
Respawnz
84a4014136 修正文件名 (#588)
* 修正文件名

* 修正一处练习序号
2019-03-16 21:48:03 -04:00
Respawnz
6c82ff3b75 翻译修改 (#583)
原文:This goes wrong of course when the original value items are not unique; in that case no error occurs, but the processing of the inverted map is simply stopped when a nonunique key is encountered, and it will most probably not contain all pairs from the original map!
我觉得这一句应该是因为编译器这种情况下不会报错才特地提醒的
虽然原文的这个句式有点让人费解...
2019-03-13 17:41:42 -04:00
Respawnz
d87d2e26d3 s和[]int之间应该加一个空格且 "slice"不属于代码部分 (#581) 2019-03-05 23:57:19 -05:00
Respawnz
1440039473 翻译修正 (#580)
翻译修正
2019-03-01 20:20:12 -05:00
MrTreasure
090466f6a5 fix:15.1一处方法调用错误 (#578) 2019-02-20 17:50:12 -05:00
无闻
9b7ac104f9 Update README.md 2019-02-19 08:41:00 -05:00
Liam Hsiia
7795f60a1c Update 09.8.md (#575)
路径错误
2019-02-16 15:38:22 -05:00
Kevin Tan
79bdc2910d fix: example code of startProcess (#572)
the first element of `argv` should be the command self which is 'ps' in this case, as the official doc says: "The argv slice will become os.Args in the new process, so it normally starts with the program name."
2019-02-05 00:12:47 -05:00
wisecsj
8db0eb3957 Fix typo: Practice 14.5 (#571)
14.2.md
2019-02-01 14:58:19 -05:00
Wen-Kang Tan
dda7746f4e 细小优化 (#569)
* Update 07.2.md

调整一些文本的可读性

* 修正语义
2019-01-29 20:25:34 -05:00
Xiangyue Cai
7771134cb0 fix link (#567) 2019-01-29 20:25:18 -05:00
Darran Zhang
2e634e2c17 Fix a variable spelling mistake. (#563) 2019-01-29 20:25:00 -05:00
When
c49ba87a09 语句问题 (#561)
* 语句不通顺

* 语句不通顺

* repair translation
2019-01-29 20:24:34 -05:00
xd
77a83f52c3 修改例子的输出错误 (#559) 2018-12-16 23:18:36 -05:00
Grenade
aadf4f12fe fix sample code bug & reformat some sample code (#557)
* Update 01.2.md

删除:
- 不支持断言

* Formatting 问题5.1 code

* Formatting 问题5.3 code

* Correct the translation

- correct `令 v := map1[key1] 可以将 key1 对应的值赋值为 v` to `令 v := map1[key1] 可以将 key1 对应的值赋值给 v`

* Modified sample code

- Add `defer fi.Close()` on `示例 12.7`

* Reformatting some sample code on 13.3

* Update 14.2.md

* Reformatting the sample code.
2018-11-22 07:22:11 -05:00
liyv
e538573122 1.切片arr1[:3],是不包括第四个元素 (#555) 2018-11-16 23:41:10 -05:00
Cooli7wa
3ed4f65f83 Add中week增加类型转换 (#554)
cannot use week (type float64) as type time.Duration in argument to t.Add
2018-11-05 16:41:30 -05:00
Joy_Zhang
cf7001dcd0 Update 14.2.md (#550) 2018-10-23 04:08:41 -04:00
Joy_Zhang
e0b1341f04 tokoi -> tokyo (#551) 2018-10-23 04:08:30 -04:00
Joy_Zhang
35b747efad tokoi -> tokyo (#552) 2018-10-23 04:08:15 -04:00
家伟 刘
d731e97104 切片的描述部分的修正 (#545)
* Update 07.4.md

* Update 07.2.md

修改切片的描述。
2018-10-15 22:00:56 -04:00
stack zhao
3618ac6047 加入书本下载 (#549) 2018-09-25 13:59:12 -04:00
Persevere Von
e80e7ed615 Update 04.2.md (#548)
提高翻译的可读性,我在读这句话的时候反复读了三四遍没看懂,最后看原文才看懂。附原文:
> Variables (like constants) contain data, and data can be of different data types, or types for short.
2018-09-21 11:53:06 -04:00
Persevere Von
6cd1b47c97 修正翻译错误 (#547)
原文 "Valid identifiers begin with a letter","letter" 这里是字母的意思
2018-09-20 15:04:44 -04:00
crackedcd
87a49f6d96 Update 04.7.md (#541)
* Update 04.7.md

原文存在歧义, 导致翻译时存在疑惑.

* Update 04.7.md

修复了原书有误的strings.IndexRune()函数说明.

* Update 04.7.md

follow owner's request "s/GO/Go".
2018-09-11 08:59:45 -04:00
crackedcd
80b74f6d08 Update min_interface.go (#543)
Min(data Miner) 方法存在bug,原因是: 该方法的逻辑类似冒泡排序, 将Miner类型变量的集合挨个两两比对,但方法中仅将两变量的较小值取出(Less()方法),并赋值记录为min,最后返回,并没有进行“冒泡”这个swap操作。
因此补充了Swap()相关的接口和实现定义,并补充了Swap()在Min()方法中的逻辑。
2018-09-10 06:34:37 -04:00
Chen Shuaimin
c28a3f0f68 update 14.4.md (#544) 2018-09-09 09:15:53 -04:00
crackedcd
86880b1bed Update 14.2.md (#542)
返回的通道的传递类型应为 item. 方法定义的返回类型, 应和方法体中return的一致, 即make(chan item).
2018-09-09 09:14:33 -04:00
GravityConstant
39fc34c47d can not get min value (#537) 2018-09-08 07:00:05 -04:00
crackedcd
b998a9462a Update 07.2.md (#540)
s := [3]int{1,2,3}[:] 会导致panic:
invalid operation [3]int literal[:] (slice of unaddressable value)
2018-09-06 20:17:52 -04:00
crackedcd
1a8952bcd4 Update 14.9.md (#539)
14.9 实现 Futures 模式 InverseFuture()定义没有返回值
2018-09-06 20:17:28 -04:00
cg
e19f2a9669 自举备注 (#534)
* 自举

* 版本补充
2018-09-06 06:15:09 -04:00
winddt
d6c4dd5a58 fix error (#533)
^2 = -3, ^2 is not equal to -11
2018-08-17 20:11:27 +08:00
Grenade
65898791c8 Formatting some sample code (#529)
* Update 01.2.md

删除:
- 不支持断言

* Formatting 问题5.1 code

* Formatting 问题5.3 code

* Correct the translation

- correct `令 v := map1[key1] 可以将 key1 对应的值赋值为 v` to `令 v := map1[key1] 可以将 key1 对应的值赋值给 v`
2018-07-24 19:36:39 +08:00
xin zhao
e3890e1115 update #16.1 (#530) 2018-07-24 19:36:03 +08:00
xin zhao
d44f630d0c update 15.3 (#528) 2018-07-20 19:18:20 +08:00