mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-27 20:30:40 +08:00
1
This commit is contained in:
parent
ff88f5d54a
commit
d5a9647902
@ -1,6 +1,7 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"sort"
|
"sort"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -269,6 +270,11 @@ func If[T any](isa bool, a, b T) T {
|
|||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UniqueJoin(s ...string) string {
|
||||||
|
data, _ := json.Marshal(s)
|
||||||
|
return string(data)
|
||||||
|
}
|
||||||
|
|
||||||
type sortSlice[E any] struct {
|
type sortSlice[E any] struct {
|
||||||
ts []E
|
ts []E
|
||||||
fn func(a, b E) bool
|
fn func(a, b E) bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user