1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-12 19:06:55 +00:00
kyverno/pkg/utils/data/compare.go
Charles-Edouard Brétéché e43b78c6c7
fix: bump golang exp lib (#8408)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-14 21:46:47 +00:00

15 lines
173 B
Go

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
}