3 ms·
The last two options are not idiomatic Go. (zero, err) and (nonZero, nil) are. So the error check is almost always a simple `if err != nil {return err}`.
by geoka9 9y ago
The last two options are not idiomatic Go.
(zero, err) and (nonZero, nil) are.
So the error check is almost always a simple `if err != nil {return err}`.
- simon_o 9y ago> The last two options are not idiomatic Go. Who are the authors of https://golang.org/pkg/io https://golang.org/pkg/io again? Yeah, 90% of Go devs agree with you. 10% think it is a really great idea. So you can never be sure without reading the documentation.