Closed dlgoodchild closed 6 years ago
Is this the best place to notify of mistakes in the book?
Hey Dave,
Yes! this is a great place to put coding issues. Thank you!
I will put updated/corrected content for each chapter, in order, here: http://lexsheehan.blogspot.com/2017/11/corrections-for-learning-fp-in-go-book.html
@dlgoodchild I just updated that corrections page with your input. Thank you!!
Lex
OK great. I'll keep you posted if I find others. I'll close this particular issue then, as it references page 1 specifically.
Actually not much further on it references 01_fib
, but actually it's 02_fib
in this repo. I'm letting you know because you can technically fix these in the repo (whereas you can't change a printed book). Actually too, if you renamed the repo to fp-go
there would be greater alignment with the book content.
Actually, not sure what to suggest now. The text references 01_fib
and the screenshot references 02_fib
.
These are fairly minor I know, but thought I'd share them anyway.
Still in chapter 1:
Since our
fibTests
structure has been defined in another test in our package, inchapter1/_01_fib/ext1_test.go
, we don't need to define it again.
There is no dir chapter1
, it's ch01-pure-fp
? and the subdir is 02_fib
, and not _01_fib
(this makes now, 3 variations). There's definitely no file named ext1_test.go
anywhere in any directory, and the fibTests
is actually FibTests
defined in simple_test.go
Contents of main.go
in 05_sum
, assuming you probably didn't mean to have this? as it doesn't import any of the src/
nor execute anything related.
package main
import (
//////////////////////////////////////////////// "mypackage"
)
func main() {
println("hello from main.go")
//////////////////////////////////////////////// println(mypackage.MyName() + " says hi from mypackage")
}
Hi,
I started reading this book via the Mapt (Packtpub) service. Barely through the first page and there's quite a number of issues.
Just letting you know that the path mentioned for "To set your
GOPATH
, visit:https://github.com/golang/go/wiki/Setting-GOPATH
" is wrong, there's no hyphen after Setting.The screenshots, links and text reference the repo (this repo) as
l3x/fp-go.git
, whereas it's actuallyl3x/learn-fp-go.git
.The screenshot associated to "go run cars.go", shows that one should
go run cars.go
in the following path:~/myprojects/fp-go/1-functional-fundamentals/ch01-pure-fp/01_oop
.There is no cars.go in that path, it's actually in
~/myprojects/fp-go/1-functional-fundamentals/ch01-pure-fp/01_oop/src/oop
. And even when you do rungo run cars.go
from that directory, you get:So
cd
back up to01_oop
and insteadgo run main.go
works correctly as illustrated in the screenshot (provided you adjust yourGOPATH
topwd
).For those less experienced, that's a considerable amount of errata for being essentially page 1.