-
Notifications
You must be signed in to change notification settings - Fork 185
Refactor ErrorLists into nil slices #2598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor ErrorLists into nil slices #2598
Conversation
02df4fc
to
5f398ac
Compare
5f398ac
to
3e6be47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mflendrich, rzetelskik The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
Tiny drive-by refactor to use nil slices where they're perfectly legal, and marginally better memory allocation-wise.
I've grepped
k8s.io/apimachinery
and they're somewhat 50-50 divided on "nil slice" andallErrs := field.ErrorList{}
.I was somewhat on the edge of "if it ain't broken, don't fix it" but uncontroversial little code smells might be a good way to get the code health in a better shape.
Feel free to close if you see a good reason to leave it as it was.
/cc rzetelskik
/kind cleanup
/priority backlog