This commit is contained in:
withchao 2023-02-03 11:50:23 +08:00
parent ff88f5d54a
commit d5a9647902

View File

@ -1,6 +1,7 @@
package utils
import (
"encoding/json"
"sort"
)
@ -269,6 +270,11 @@ func If[T any](isa bool, a, b T) T {
return b
}
func UniqueJoin(s ...string) string {
data, _ := json.Marshal(s)
return string(data)
}
type sortSlice[E any] struct {
ts []E
fn func(a, b E) bool