Skip to content

fix: fix slice init length #3064

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

Merged
merged 1 commit into from
Jan 1, 2025
Merged

fix: fix slice init length #3064

merged 1 commit into from
Jan 1, 2025

Conversation

occupyhabit
Copy link
Contributor

@occupyhabit occupyhabit commented Dec 3, 2024

Description

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

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

Which issue(s) this PR fixes:

Fixes #

Testing

Checklist:

  • I ran tests as well as code linting locally to verify my changes.
  • I have done manual verification of my changes, changes working as expected.
  • I have added new tests to cover my changes.
  • My changes follow contributing guidelines of Fission.
  • I have signed all of my commits.

Signed-off-by: occupyhabit <wangmengjiao@outlook.com>
Copy link

codecov bot commented Jan 1, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 44.54%. Comparing base (59267e3) to head (123d041).
Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
pkg/fission-cli/cliwrapper/driver/cobra/cobra.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3064   +/-   ##
=======================================
  Coverage   44.54%   44.54%           
=======================================
  Files         236      236           
  Lines       24731    24731           
=======================================
  Hits        11017    11017           
  Misses      12308    12308           
  Partials     1406     1406           
Flag Coverage Δ
unittests 44.54% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sanketsudake sanketsudake merged commit 3f0e4f5 into fission:main Jan 1, 2025
10 checks passed
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.

2 participants