Bump the golang.org/x/exp dependency and fix a build breakage. (#2088)

* Bump the golang.org/x/exp dependency and fix a build breakage.

---------

Signed-off-by: Dan Lorenc <dlorenc@chainguard.dev>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
dlorenc
2023-09-07 14:55:52 -04:00
committed by GitHub
co-authored by Christopher Phillips
parent 1315cfd787
commit 9f22ab6137
8 changed files with 39 additions and 18 deletions
@@ -1,6 +1,7 @@
package cyclonedxhelpers
import (
"strings"
"time"
"github.com/CycloneDX/cyclonedx-go"
@@ -182,8 +183,8 @@ func toDependencies(relationships []artifact.Relationship) []cyclonedx.Dependenc
result = append(result, *dep)
}
slices.SortFunc(result, func(a, b cyclonedx.Dependency) bool {
return a.Ref < b.Ref
slices.SortFunc(result, func(a, b cyclonedx.Dependency) int {
return strings.Compare(a.Ref, b.Ref)
})
return result