Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode

This commit is contained in:
wangchuxiao 2023-02-03 12:17:04 +08:00
commit 2243e8194d

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