Implement error handling and logging in Go
Understand how to handle errors and log helpful information in your Go programs.
Learning objectives
In this module, you'll learn about:
- Go's approach to error handling.
- Error handling strategies.
- The
logstandard package for logging. - Logging frameworks.
Prerequisites
- A Go environment that's ready to create applications. Ideally, you should have installed and configured Go locally and installed Visual Studio Code with the Go extension.
- Ability to create and modify
.gofiles. - Ability to run Go applications by using the terminal prompt.
- Knowledge of basic data types, like
string,int, andboolean. - Knowledge of how to write basic data control flows, like
ifandforstatements. - Knowledge of how to write functions that have multiple return values.

