logoalt Hacker News

kiitos06/06/20251 replyview on HN

The fmt.Errorf expr is wrapping the error, with relevant context at the wrap-site. It's not just "log-friendlier" it's actually important metadata.


Replies

geoka906/07/2025

I think we are saying the same thing: it is important metadata which is meant for human consumption (as opposed to the wrapped sentinel error) -- hence "log-friendly".

show 1 reply