Skip to content

Commit b3cf6e0

Browse files
committed
update errata.md, fix #13
1 parent afb4351 commit b3cf6e0

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
*.dll
55
*.so
66
*.dylib
7+
.DS_Store
78

89
# Test binary, built with `go test -c`
910
*.test
1011

1112
# Output of the go coverage tool, specifically when used with LiteIDE
1213
*.out
14+
*.swp
15+
*.swo
16+
*.swa
1317

1418
# Dependency directories (remove the comment below to include it)
1519
# vendor/
20+

chapter3/sources/slice_unbind_orig_array.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import "fmt"
44

55
func main() {
6-
u := []int{11, 12, 13, 14, 15}
6+
u := [...]int{11, 12, 13, 14, 15}
77
fmt.Println("array:", u) // [11, 12, 13, 14, 15]
88
s := u[1:3]
99
fmt.Printf("slice(len=%d, cap=%d): %v\n", len(s), cap(s), s) // [12, 13]

errata.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
| 11 | Go语言精进之路vol1 | p103 | 示例代码有误,具体参见[issue 9](https://github.com/bigwhite/GoProgrammingFromBeginnerToMaster/issues/9) | liansyyy(https://github.com/liansyyy) | typo | 应改为 p := &m[key] |
2020
| 12 | Go语言精进之路vol1 | p350 | “如何s[n]T或\*[n]T的数组类型,len(s)返回数组的长度n” | bin4tre([email protected]) | typo | 应将“如何”改为 “如果” |
2121
| 13 | Go语言精进之路vol1 | p352 | trySend函数的default分支的返回语句拼写错误"etrun false" | bin4tre([email protected]) | typo | 应改为 “return false” |
22-
| 14 | Go语言精进之路vol1 | 具体参见[issue12](https://github.com/bigwhite/GoProgrammingFromBeginnerToMaster/issues/12) | 图8-1 变量声明语法错误 | https://github.com/jackbai233 | 内容错误 | 图中a :=(int32)17应改为a := int32(17) 另一个var a = (int32)17应改为 var a = int32(17) |
22+
| 14 | Go语言精进之路vol1 | p62, 具体参见[issue12](https://github.com/bigwhite/GoProgrammingFromBeginnerToMaster/issues/12) | 图8-1 变量声明语法错误 | https://github.com/jackbai233 | 内容错误 | 图中a :=(int32)17应改为a := int32(17) 另一个var a = (int32)17应改为 var a = int32(17) |
23+
| 15 | Go语言精进之路vol1 | p89, 具体参见[issue13](https://github.com/bigwhite/GoProgrammingFromBeginnerToMaster/issues/12) | slice_unbind_orig_array.go代码中数组u初始化有笔误 | https://github.com/jackbai233 | typo | 书中代码u := []int{11, 12, 13, 14, 15} 应该为u := [...]int{11, 12, 13, 14, 15}|

0 commit comments

Comments
 (0)