Errata
The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
Version | Location | Description | Submitted By | Date submitted | Date corrected |
---|---|---|---|---|---|
Page 10 last paragraph |
"For example, 1.234, 123.4, 0.00001234, and 12340000 are all floating-point numbers.". How is 12340000 a floating-point number? Note from the Author or Editor: |
Jon Forrest | Nov 01, 2017 | ||
Printed | Page 12 Last paragraph |
Should read "Hello, " + "World" NOT "Hello, " + World" Note from the Author or Editor: |
Robert Collins | May 17, 2017 | |
Page 19 1st paragraph |
"In addition, there two alias types ... " Should be, "there _are_ two alias types". |
Caleb St-Denis | Mar 16, 2019 | ||
Page 34 Compiler error message |
This might be cause by that fact that I'm using Go 1.9.2 but the error message I see is invalid operation: total / len(x) (mismatched types float64 and int) (Note that is doesn't include the constant '5' that the book shows.) Note from the Author or Editor: |
Jon Forrest | Nov 01, 2017 | ||
Page 48 4th paragraph |
(This is an extremely minor nit). "One way to use closure" -> "One way to use a closure" Note from the Author or Editor: |
Jon Forrest | Nov 08, 2017 | ||
Page 57 1st example in Fields section |
You show fmt.Println(c.x, c.y, c.r) c.x = 10 c.y = 5 Shouldn't this be c.x = 10 c.y = 5 fmt.Println(c.x, c.y, c.r) Note from the Author or Editor: |
Jon Forrest | Nov 09, 2017 | ||
Page 61 Chapter 7 |
Creating a Multishape like described: multiShape := MultiShape { shapes : [] Shape { Circle { 0 , 0 , 5 }, Rectangle { 0 , 0 , 10 , 10 }, }, } spits a compile error: cannot use Circle literal (type Circle) as type Shape in array or slice literal: Circle does not implement Shape (area method has pointer receiver) cannot use Rectangle literal (type Rectangle) as type Shape in array or slice literal: Rectangle does not implement Shape (area method has pointer receiver) Note from the Author or Editor: |
Nicholas Crespi | Nov 16, 2016 | ||
Page 66 Penultimate paragraph code example |
Tiny typo: fmt.Println(strings.Split("a-b-c-d-e", "-"))) Should read: fmt.Println(strings.Split("a-b-c-d-e", "-")) |
JC | Oct 31, 2016 | ||
Printed | Page 67 4th line |
Two small typos on page 67. The fmt.Println statements have been commented out in the code. Great book! Note from the Author or Editor: |
Anonymous | Mar 20, 2016 | |
Printed, PDF | Page 73 code at the bottom |
The import is missing one package: "io" On the next page, page 74, there is a line of code : _, err := io.Copy(h, f) This will get error if there is no "io" package in the import statement. The import should be: import ( "fmt" "hash/crc32" "io/ioutil" "io" ) Note from the Author or Editor: |
Ardya Dipta Nandaviri | May 07, 2018 | |
Mobi | Page 294 Strings |
"Hello, " + World" => "Hello, " + "World" Note from the Author or Editor: |
mkamimura | Jan 27, 2016 | |
Safari Books Online | 999 Second program listing under "Hashes and Cryptography" in Ch 8 |
As printed (in the Safari Online Book) the second program listed - the one with the getHash function has *several* compile errors with go version go1.5.3 darwin/amd64. dhassler% go run crc32.go # command-line-arguments ./crc32.go:6: imported and not used: "io/ioutil" ./crc32.go:11: undefined: os in os.Open ./crc32.go:22: no new variables on left side of := ./crc32.go:22: undefined: io in io.Copy I have resolved each to get the example to run but would be interested in the author's solutions - what is the correct version of this example? Have the examples in the book been tested??? Note from the Author or Editor: |
Dan Hassler | Jan 25, 2016 |