mirror of
https://github.com/anchore/grype
synced 2024-11-10 06:34:13 +00:00
test: fix slice init length (#2133)
Signed-off-by: xixishidibei <xixishidibei@outlook.com>
This commit is contained in:
parent
60c0682bb4
commit
14398b776e
1 changed files with 1 additions and 1 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue