The Art of Error Handling in Go

· β˜• 5 min read
Error handling in Go often puzzles beginners and those coming from other programming languages. In this post, we differentiate between errors (`error`) and exceptions (`panic`), discuss what makes an error "good" (easy to check and debug), and introduce a common way to make errors "good" β€” using `fmt.Errorf()`.