4 ms·
Surprised that the "always wrap your errors" rule isn't in there. It's been the rule in the last few Go teams I've been in.
by marcus_holmes 3y ago
Surprised that the "always wrap your errors" rule isn't in there. It's been the rule in the last few Go teams I've been in.
- AlexCoventry 3y agoWe moved away from wrapping them recently for performance reasons.
- za3faran 3y agoHow much of a performance hit were they causing?
- lanstin 3y agoand how many errors are they getting?
- sethammons 3y agoYou got to add more context here. An entire blog post would be worthy. We do some very performant code at high scale and error wrapping has never put pressure on our systems. Highly interested in what you saw.
- preseinger 3y agowhat programs are you writing where error wrapping represents a performance cost that's worth avoiding???
- stephen123 3y agoIt seems like a waste of time to me. Wrapping errors adds context. But you can usually get enough context from stack traces.
- masklinn 3y agoBut you don’t have stacktraces.