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

miss makezero in slice init #3592

Closed
alingse opened this issue May 27, 2024 · 1 comment
Closed

miss makezero in slice init #3592

alingse opened this issue May 27, 2024 · 1 comment

Comments

@alingse
Copy link

alingse commented May 27, 2024

I was running github actions to run linter makezero for top github golang repos.

see issues alingse/go-linter-runner#1

and the github actions output https://github.com/alingse/go-linter-runner/actions/runs/9242985516/job/25426520521

====================================================================================================
append to slice `oldIPsStrings` with non-zero initialized length at https://github.com/rancher/rke/blob/release/v1.5/pki/util.go#L512:1[9](https://github.com/alingse/go-linter-runner/actions/runs/9242985516/job/25426520521#step:4:10)
append to slice `newIPsStrings` with non-zero initialized length at https://github.com/rancher/rke/blob/release/v1.5/pki/util.go#L513:19
append to slice `Env` with non-zero initialized length at https://github.com/rancher/rke/blob/release/v1.5/cluster/plan.go#L216:9
append to slice `Env` with non-zero initialized length at https://github.com/rancher/rke/blob/release/v1.5/cluster/plan.go#L298:9
append to slice `Env` with non-zero initialized length at https://github.com/rancher/rke/blob/release/v1.5/cluster/plan.go#L306:9
append to slice `Env` with non-zero initialized length at https://github.com/rancher/rke/blob/release/v1.5/cluster/plan.go#L339:8
====================================================================================================

the oldIPsStrings := make([]string, len(oldIPs)) should be oldIPsStrings := make([]string, 0, len(oldIPs))

Copy link
Contributor

This repository uses an automated workflow to automatically label issues which have not had any activity (commit/comment/label) for 60 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the workflow can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the workflow will automatically close the issue in 14 days. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant