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

fix: fix slice init length #1008

Closed
wants to merge 2 commits into from
Closed

Conversation

cuishuang
Copy link
Contributor

The intention here should be to initialize a slice with a capacity of len(observers) rather than initializing the length of this slice.

The online demo: https://go.dev/play/p/q1BcVCmvidW

Copy link
Member

@iwpnd iwpnd left a comment

Choose a reason for hiding this comment

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

good catch

@ARolek
Copy link
Member

ARolek commented Oct 4, 2024

I agree, good catch!

@ARolek
Copy link
Member

ARolek commented Oct 4, 2024

Looks like govulncheck is failing. I'm going to upgrade Go in a separate PR and then you can rebase to get the CI to pass.

Copy link
Member

@gdey gdey left a comment

Choose a reason for hiding this comment

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

LGTM! Good catch!

@ARolek
Copy link
Member

ARolek commented Oct 4, 2024

@cuishuang please rebase this branch against master

@cuishuang
Copy link
Contributor Author

@cuishuang please rebase this branch against master

Updated. Please review again.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 49730d774-PR-1008

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 42.751%

Changes Missing Coverage Covered Lines Changed/Added Lines %
observability/observability.go 0 1 0.0%
Totals Coverage Status
Change from base Build e86532692: 0.0%
Covered Lines: 7003
Relevant Lines: 16381

💛 - Coveralls

@ARolek
Copy link
Member

ARolek commented Oct 7, 2024

This has been merged into master: 0f3131f

Thanks for the contribution!

@ARolek ARolek closed this Oct 7, 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.

5 participants