Rethinking Errors in Go
summary
Example shows copying a reader to a Google Cloud Storage file atomically and reveals that the naive defer-close-with-error pattern breaks on panic and on ignored close errors, growing the code from about six lines into much more. The uploader-provided burner package burner package (called air-sea in the transcript) introduces a unified error variable that tracks regular errors and panics, preserves defer semantics, and yields code that looks like the original idiom while surfacing the close error for retries.
AI-written summary · about








