Open dsnet opened 1 year ago
It would be good if we could control whether the library panics or returns an error -
Knative has wrapped this library to handle that https://github.com/knative/pkg/blob/d0a82f9cbb8f2f92ce8f130c701f2da29bb33109/kmp/diff.go#L41
Overall, this package has held up well. If we were to ever consider a v2, here are some changes:
It's unclear whether
SortMaps
andSortSlices
should take a less function (i.e.,func(T, T) bool
) or a compare function (i.e.,func(T, T) int
) to match the currentslices.SortFunc
signature.