4 ms·
> It's not easy to forget error handling in Go. It's very easy to do so if the function has no useful return value or you don't care for it e.g. Writer.Write:
by masklinn 9y ago
> It's not easy to forget error handling in Go.
It's very easy to do so if the function has no useful return value or you don't care for it e.g. Writer.Write: https://play.golang.org/p/cPh0PJoz-v https://play.golang.org/p/cPh0PJoz-v
> And letting exceptions bubble up all the way will improve things how?
Errors the developer forgets (or does not want) to handle will trigger a default handler.
- garfij 9y agoIn practice, what you end up doing is adding the `errcheck` linter to your build process and it finds all instances of you not dealing with an error return and it's "just-as-good" as a compile time check.