Skip to content

Commit

Permalink
test: fix slice init length (#2133)
Browse files Browse the repository at this point in the history
Signed-off-by: xixishidibei <[email protected]>
  • Loading branch information
xixishidibei authored Sep 18, 2024
1 parent 60c0682 commit 14398b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grype/presenter/sarif/presenter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ type MockMetadataProvider struct{}

func (m *MockMetadataProvider) GetMetadata(id, namespace string) (*vulnerability.Metadata, error) {
cvss := func(id string, namespace string, scores ...float64) vulnerability.Metadata {
values := make([]vulnerability.Cvss, len(scores))
values := make([]vulnerability.Cvss, 0, len(scores))
for _, score := range scores {
values = append(values, vulnerability.Cvss{
Metrics: vulnerability.CvssMetrics{
Expand Down

0 comments on commit 14398b7

Please sign in to comment.