Error handling in Go: Common pitfalls
Error handling in Go: Common pitfalls
pvs-studio.com
Error handling in Go: Common pitfalls
Developers coming to Go from languages that use try/catch constructs, like Java or C#, may feel a bit turned around. The inner voice suggests using ′recover′ with ′defer′ as the nearest equivalent...

When switching from other languages the urge to reach for recover/defer as a try/catch substitute is real