News for hackers. Stuff that matters.
Re:Get familiar with workspaces by nkozyra on Monday April 11, 2022 @09:01PM (#30997300)
I also panic whenever possible from the caller, in which case I get a pretty clear stack trace. I understand you don't always want that but imo I don't have a lot of cases where I'm ultimately throwing my hands up on a non-exception error.

I think V2 errors are taking more of a lead from the pkg/errors error.Wrap approach anyway.

Re:Get familiar with workspaces by preseinger on Monday April 11, 2022 @09:24PM (#30997461)
pkg/errors.Wrap is already accomplished in the stdlib via fmt.Errorf("annotation: %w", err).

Programs which use `panic` as ersatz error mechanisms are fundamentally broken. `panic` expresses an invariant violation that's much different than normal errors.