diff --git a/pkg/util/map.go b/pkg/util/map.go deleted file mode 100644 index ba07f87..0000000 --- a/pkg/util/map.go +++ /dev/null @@ -1,19 +0,0 @@ -package utils - -import "sort" - -type Pair[K comparable, V any] struct { - Key K - Value V -} - -func SortMap[K comparable, V any](m map[K]V, less func(i, j Pair[K, V]) bool) []Pair[K, V] { - pairs := make([]Pair[K, V], 0, len(m)) - for k, v := range m { - pairs = append(pairs, Pair[K, V]{k, v}) - } - sort.Slice(pairs, func(i, j int) bool { - return less(pairs[i], pairs[j]) - }) - return pairs -}