letsencrypt / letsencrypt/boulder
go1.26: replace errors.New with fmt.Errorf
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 649
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 24
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the repository for errors.New usages and inspect each affected package and its existing tests. Replace applicable uses consistently with fmt.Errorf, then run the relevant package tests and confirm no intended errors.New calls remain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100