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 #2981

Closed
alingse opened this issue May 27, 2024 · 1 comment · Fixed by #2982
Closed

miss makezero in slice init #2981

alingse opened this issue May 27, 2024 · 1 comment · Fixed by #2982

Comments

@alingse
Copy link

alingse commented May 27, 2024

NOTE: Have a general question? You'll get a better response on the dnscontrol-discuss email list!

Describe the bug

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/9242994368/job/25426542378

====================================================================================================
append to slice `mzn` with non-zero initialized length at https://github.com/StackExchange/dnscontrol/blob/main/providers/gcloud/gcloudProvider.go#L482:10
====================================================================================================

the mzn := make([]*gdns.ManagedZonePrivateVisibilityConfigNetwork, len(g.Networks)) should be mzn := make([]*gdns.ManagedZonePrivateVisibilityConfigNetwork, 0, len(g.Networks))

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

DNS Provider

  • FILL IN

Additional context
Add any other context about the problem here.

@tlimoncelli
Copy link
Contributor

Thanks for the report!
Fixing in #2982

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 a pull request may close this issue.

2 participants