mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-05 21:47:31 +00:00
chore: using wk8/go-ordered-map/v2 replace internal StringMapSlice
This commit is contained in:
8
common/utils/manipulation.go
Normal file
8
common/utils/manipulation.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package utils
|
||||
|
||||
import "github.com/samber/lo"
|
||||
|
||||
func EmptyOr[T comparable](v T, def T) T {
|
||||
ret, _ := lo.Coalesce(v, def)
|
||||
return ret
|
||||
}
|
||||
Reference in New Issue
Block a user