Fix: vmess http method may empty

This commit is contained in:
Dreamacro
2023-08-03 22:51:12 +08:00
parent 9e78137768
commit 47b6eb1700
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,8 @@
package util
import "github.com/samber/lo"
func EmptyOr[T comparable](v T, def T) T {
ret, _ := lo.Coalesce(v, def)
return ret
}