4 ms·
I dislike this style in Go. It adds a lot of noise to the source and essentially builds a stack trace manually. In Go 1.23 there is errors.Wrap() that adds the
by fpoling 2y ago
I dislike this style in Go. It adds a lot of noise to the source and essentially builds a stack trace manually. In Go 1.23 there is errors.Wrap() that adds the error stack automatically so maybe at some point Go will consider again adding some sugar for automatic error propagation.
- lukax 2y agoGo errors in standard library does not support stack traces. errors.Wrap() only exists in github.com/pkg/errors package