Return a Bool or an Error in Go?
· 3 min read
In Go, errors are returned instead of exceptions being thrown when something goes wrong. In other languages, you might use a boolean to indicate the success of an operation. This post captures some thoughts on when to return a boolean and when to return an error in Go.