• Error Values: Frequently Asked Questions
  • How should I change my error-handling code to work with the new features?
  • I am already using fmt.Errorf with %v or %s to provide context for an error. When should I switch to %w?
  • How can I add context to an error I'm already returning without breaking clients?
  • I'm writing new code, with no clients. Should I wrap returned errors or not?
  • I maintain a package that exports an error-checking predicate function. How should I adapt to the new features?
  • I have a type that implements error and holds a nested error. How should I adapt it to the new features?