Catching Go errors with errors.Is()

Tom Deneire
3 min readApr 26, 2022
Photo by David Pupaza on Unsplash

Go error handling

Anyone who has done some development in Go will be familiar with the Go philosophy on error handling and the following pattern:

result, err := myFunc(args)
if err != nil {
// do something
}

Catching errors

--

--