Go Error Handling (Part 3) — The errors Package

Photo by freestocks on Unsplash

The Go standard library's errors package makes it quick and easy to create error variables. Once the error variables are created, you can then use the if-statement pattern to decide what to do with it.

The error’s package is a popular alternative to using Go’s built-in error type. That’s because using…