Code Snippets

Tag: Errors

Wrap and Unwrap Errors in Go

Wrap errors with fmt.Errorf %w and inspect with errors.Is / As.

Author: chris

Error Handling with anyhow

Use anyhow::Result and the `?` operator for ergonomic errors.

Author: chris