Skip to content

Commit

Permalink
refactor: rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Oct 9, 2024
1 parent b6bc5d2 commit 91f61e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/osvscanner/osvscanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,17 +520,17 @@ func scanSBOMFile(r reporter.Reporter, path string, fromFSScan bool) ([]scannedP
}
}

packages2 := make([]scannedPackage, 0, len(packages))
sliceOfPackages := make([]scannedPackage, 0, len(packages))

for _, pkg := range packages {
packages2 = append(packages2, pkg)
sliceOfPackages = append(sliceOfPackages, pkg)
}

slices.SortFunc(packages2, func(i, j scannedPackage) int {
slices.SortFunc(sliceOfPackages, func(i, j scannedPackage) int {
return strings.Compare(i.PURL, j.PURL)
})

return packages2, nil
return sliceOfPackages, nil
}

var formatErr sbom.InvalidFormatError
Expand Down

0 comments on commit 91f61e0

Please sign in to comment.