In this post we’re going to share some lessons we’ve learned while using Go in production for several years here at Gravitational.

Intro

Go does not have exceptions, rather error handling is done by checking errors. This requires some adjustments in how you deal with errors if you are coming from languages that have exceptions as a primary error handling mechanism.

Dave Cheney wrote a series of articles going deeper into better ways to handle errors in Go, which I highly recommend reading.

Here are some tips and solutions that helped me to improve error handling in Go applications:

#go #golang

How to Error Handling in Go Programs
2.25 GEEK