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

Merged
merged 1 commit into from
Oct 5, 2024
Merged

fix: fix slice init length #4938

merged 1 commit into from
Oct 5, 2024

Conversation

cuishuang
Copy link
Contributor

@cuishuang cuishuang commented Oct 4, 2024

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

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

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

New Dependency Instructions (If applicable)

@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

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

Project coverage is 31.86%. Comparing base (5b6b5ce) to head (51dc6ba).

Files with missing lines Patch % Lines
...kg/infrastructure/postgres/scheduleactionrecord.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4938   +/-   ##
=======================================
  Coverage   31.86%   31.86%           
=======================================
  Files         265      265           
  Lines       19318    19318           
=======================================
  Hits         6156     6156           
  Misses      11770    11770           
  Partials     1392     1392           

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

Signed-off-by: cuishuang <imcusg@gmail.com>
Copy link

sonarqubecloud bot commented Oct 4, 2024

Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the good catch

@cloudxxx8 cloudxxx8 merged commit 2495dbd into edgexfoundry:main Oct 5, 2024
6 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.

3 participants