Structured Errors in Go
Article
Go gives you errors as values and, since 1.21, structured logging in the standard library. The two do not meet: context is known deep in the call stack, and the decision to write a log record belongs at the boundary. A small type closes ...