chore: upgrade tailscale to v1.46.1 (#8913)

This commit is contained in:
Colin Adler
2023-08-09 19:50:26 +00:00
committed by GitHub
parent 5b9dc2ee8b
commit bc862fa493
25 changed files with 467 additions and 297 deletions
+18
View File
@@ -1,5 +1,9 @@
package slice
import (
"golang.org/x/exp/constraints"
)
// SameElements returns true if the 2 lists have the same elements in any
// order.
func SameElements[T comparable](a []T, b []T) bool {
@@ -69,3 +73,17 @@ func OverlapCompare[T any](a []T, b []T, equal func(a, b T) bool) bool {
func New[T any](items ...T) []T {
return items
}
func Ascending[T constraints.Ordered](a, b T) int {
if a < b {
return -1
} else if a == b {
return 0
} else {
return 1
}
}
func Descending[T constraints.Ordered](a, b T) int {
return -Ascending[T](a, b)
}