bigwhite / GoProgrammingFromBeginnerToMaster

Go语言精进之路书籍配套代码
Apache License 2.0
249 stars 83 forks source link

纸质第一册 P89 chapter3/sources/slice_unbind_orig_array.go代码中数组u初始化有笔误 #13

Closed jackbai233 closed 2 years ago

jackbai233 commented 2 years ago

按照书中上下文与代码中的打印描述, 代码中的变量 u应为数组,故初始化应为:u := [5]int{11, 12, 13, 14, 15}u := [...]int{11, 12, 13, 14, 15}。 书中为u := []int{11, 12, 13, 14, 15} https://github.com/bigwhite/GoProgrammingFromBeginnerToMaster/blob/af651d9156af497340e6e75aadda6a9215b3942a/chapter3/sources/slice_unbind_orig_array.go#L6

bigwhite commented 2 years ago

感谢指出,已更新到勘误,并更新了slice_unbind_orig_array.go源码。