Hacker News new | ask | show | jobs
by dlock17 380 days ago
I like this, as it also maps well to using defer at the top of the function to wrap any returned errors with metadata.

I've implemented something similar in my errors library relying on log/slog.Attr.