Go for DevOps
You're viewing a free preview. Sign in free to read every script.
Why this exists Go has no exceptions: a function that can fail returns an error, and you decide what to do at every call. That makes failure handling explicit and boring, which is a strength, when you follow a few…
Go for DevOps: Errors in Depth with %w Wrapping, errors.Is and errors.As, Join, the Typed-nil Trap and Exit Codes
Design failure handling in Go: wrap errors to add context without losing the cause, test with errors.Is and errors.As, collect several errors, avoid the nil-interface trap, know what log.Fatal and os.Exit skip, recover a panic at the top, and map error kinds to distinct exit codes.
Sign in free to read this script, along with the rest of the library.
Sign in free