All languages

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 callers decide what to do. Done well, that produces programs whose failures are easy to trace: each layer adds context, and the top…

Go Basics: Errors, defer and Custom Error Types

How Go handles failure: returning errors, wrapping them with %w, checking with errors.Is and errors.As, sentinel and custom error types, and using defer to close files and release locks reliably.

Sign in free to read this script, along with the rest of the library.

Sign in free