Errata

Learning Go

Errata for Learning Go

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
PDF Page Page 73
2nd paragraph

The paragraph starts comparing if statements to for statements and then refers to the wrong type in the 3rd sentence: "The if statement has three parts, separated by semicolons."

This should read "The for statement has three parts, separated by semicolons."

ie s/if/for/

Anonymous  Feb 21, 2024 
Printed Page 5
line 6

An unnecessary comma inside the quotation marks for binary name "hello," -> should be "hello".

Dmitrii  Apr 01, 2024 
Printed Page 73
4th paragraph

i{plus}{plus} seems strange

Simon  Feb 24, 2024 
PDF Page 102
2nd code

The code in the book is different from the code in The Go Playgound:

expressions := [][]string{
{"2", "+", "3"},
{"2", "-", "3"},
{"2", "*", "3"},
{"2", "/", "3"},
{"2", "%", "3"},
{"two", "+", "three"},
{"5"},
}

should be:

expressions := [][]string{
[]string{"2", "+", "3"},
[]string{"2", "-", "3"},
[]string{"2", "*", "3"},
[]string{"2", "/", "3"},
[]string{"2", "%", "3"},
[]string{"two", "+", "three"},
[]string{"5"},
}

Anonymous  May 22, 2024 
PDF Page 110
4th paragraph

(I cover at methods in Go in Chapter 7.)

(I cover methods in Go in Chapter 7.)

"at" is not necessary, right?
You do not use "at" in the code.

Anonymous  May 28, 2024 
PDF Page 144
2nd paragraph

There is an extra t in "This means that tthe type has a specified way to store its data and provides an implementation of any methods declared on the type"

s/tthe/the

Anonymous  Feb 23, 2024 
Printed Page 144
line 7

"tthe" instead of "the"

Dmitrii  Apr 11, 2024 
Printed, PDF, ePub Page 175
3rd paragraph (not counting code)

Text reads as

> By a stunning coincidence, LoggerAdapter and SimpleDataStore happen to meet the interfaces needed by your business logic, but neither type has any idea that it does.

I was confused by this and realized that it was a typo; we just defined LoggerAdapter and DataStore interfaces, so the text should read

> By a stunning coincidence, LoggerAdapter and DataStore happen to meet the interfaces needed by your business logic, but neither type has any idea that it does.

Anonymous  Feb 11, 2024 
Printed, PDF, ePub Page 175
3rd paragraph (not counting code)

Text reads as

> By a stunning coincidence, LoggerAdapter and SimpleDataStore happen to meet the interfaces needed by your business logic, but neither type has any idea that it does.

I was confused by this and realized that it was a typo; we just defined LoggerAdapter and DataStore interfaces, so the text should read

> By a stunning coincidence, LoggerAdapter and DataStore happen to meet the interfaces needed by your business logic, but neither type has any idea that it does.

Stanley Chan  Feb 11, 2024 
Printed, PDF, ePub Page 196
"More on comparable" section

Typo

> As you saw in “Interfaces Are Comparable” on page 165, interfacesare one of the comparable types in Go.

interfacesare does not have a space in between. Should read as

> As you saw in “Interfaces Are Comparable” on page 165, interfaces are one of the comparable types in Go.

Stanley Chan  Feb 27, 2024 
PDF Page 307, Concurrency Practices and Patterns, When to use buffered and unbuffered channels
6th paragraph, under the code example

This means we can
create a buffered channel with one space for each launched goroutine, and
have each goroutine write data to this **goroutine** (<- this should be "channel") without blocking.

Cristian Chira  May 15, 2024