boulder icon indicating copy to clipboard operation
boulder copied to clipboard

go1.26: replace errors.New with fmt.Errorf

Open aarongable opened this issue 10 months ago • 1 comments

It used to be the case that errors.New was more efficient than fmt.Errorf, and therefore folks said that you should use errors.New any time you were creating an error and didn't need any formatting capabilities. That is no longer the case, so we should switch to using fmt.Errorf everywhere for the sake of consistency and lower mental overhead.

Read more: https://antonz.org/go-1-26/#fmt-errorf, https://go-review.googlesource.com/c/go/+/708836

aarongable avatar Jan 05 '26 19:01 aarongable

Hey Aaron! I would love to take this issue. I'm starting out to contribute in open source, and have signed up for Codepath's AI Capstone course where I work on open source contributions. I'm particularly looking for starter issues in Go and I feel this is great to start with. If you're still open, I would love to work on this!

Ackberry avatar Jun 04 '26 03:06 Ackberry