Skip to content
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

node: prefer nil slices over zero-length slices #19083

Merged
merged 1 commit into from
Feb 18, 2019

Conversation

Matthalp-zz
Copy link
Contributor

Golang best practice is to use a nil slice variable declaration instead of instantiating a zero-length slice [1].

[1] https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@karalabe karalabe added this to the 1.9.0 milestone Feb 18, 2019
@karalabe karalabe merged commit 7b3e3d5 into ethereum:master Feb 18, 2019
kiku-jw pushed a commit to kiku-jw/go-ethereum that referenced this pull request Mar 29, 2019
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 4, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 4, 2024
wanwiset25 pushed a commit to XinFinOrg/XDPoSChain that referenced this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants