Go Time: Golang, Software Engineering cover image

SOLID Go Design

Go Time: Golang, Software Engineering

00:00

How to Handle an Error Not Equal to Nil

The errors package with the wrap method gives you the ability for that little piece of log context that you're going to call in log.error f, just put that in the error message and return that to the caller. So all those annotations which are previously sent out to the log file via this side channel are now available at the top when you’re going to print out or analyze that error.

Play episode from 41:47
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app