> The io.ReadAll function and the io.Reader interface Read method are not 
the same, don't conflate them.
Thank you for stressing that point, but I don't think that I conflate them. 
Maybe I wrong, but I believe that many entries in "io" package share 
decriptions that states "A successful call returns err == nil, not err == 
EOF. Because ReadAll is defined to read from src until EOF, it does not 
treat an EOF from Read as an error to be reported.", so I quote it just 
because it was at my hand.

> Have you read https://go.dev/blog/errors-are-values by Rob Pike?
Thank you very much Michael, I read few things about errors in Go, but 
never that blog post. Now I need for my job to process few files in Go, so 
I need to read "io" first, but after that, I will read this mail. In some 
sense I'm a fan of Rob Pike blog posts, articles and talks. Hard to say 
why, maybe he is "no nonsense guy"?

Best
Kamil
czwartek, 7 października 2021 o 15:13:22 UTC+2 michael...@gmail.com 
napisał(a):

> Kamil,
> Have you read https://go.dev/blog/errors-are-values by Rob Pike?  
> Wrapping my head around the concept that an error is simply a value 
> returned from a function was tremendously helpful when I had questions 
> along the same lines as yours.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a44f9c63-cea5-4325-a872-83c71a5e28a5n%40googlegroups.com.

Reply via email to