Skip to content

refactor: replace empty slice literal with var#747

Merged
kpacha merged 1 commit intomasterfrom
deepsource-autofix-a11cfc7f
Jan 15, 2025
Merged

refactor: replace empty slice literal with var#747
kpacha merged 1 commit intomasterfrom
deepsource-autofix-a11cfc7f

Conversation

@deepsource-autofix
Copy link
Copy Markdown
Contributor

An empty slice can be represented by nil or an empty slice literal. They are
functionally equivalent — their len and cap are both zero — but the nil
slice is the preferred style. For more information about empty slices,
see Declaring Empty Slices.

An empty slice can be represented by `nil` or an empty slice literal. They are
functionally equivalent — their `len` and `cap` are both zero — but the `nil`
slice is the preferred style. For more information about empty slices,
see [Declaring Empty Slices](https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices).
@kpacha kpacha merged commit fff63b0 into master Jan 15, 2025
@kpacha kpacha deleted the deepsource-autofix-a11cfc7f branch January 15, 2025 11:55
@github-actions
Copy link
Copy Markdown

This pull request was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant