by hota_mazi · 6y ago · 0 comments
The only thing in Go source code that you see more often than the boiler plate "if err != nil" is "a, _ = foo()".
It's all too easy to ignore an error in Go.
Where did you see that ? because that's not been my experience at all, and I've looked at a lot of Go code.
Go has many community linters available, https://github.com/kisielk/errcheck is popular for checking unhandled errors.
If you'd like a combo-pack, check out https://github.com/golangci/golangci-lint which includes all of the popular linters in a configurable way.
The reason why you don't see that is because you have to be explicit about that, it's not something you forget it's done on purpose which obviously no one does.