1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-12 10:56:54 +00:00
kyverno/pkg/utils/data/compare.go

16 lines
173 B
Go
Raw Normal View History

package data
import (
"golang.org/x/exp/constraints"
)
func Compare[T constraints.Ordered](a, b T) int {
if a < b {
return -1
}
if a > b {
return 1
}
return 0
}