feat: support to mark direct traffic (#24)

This commit is contained in:
mzz
2023-02-20 18:06:54 +08:00
committed by GitHub
parent 9efeada72d
commit 9fd52c4d38
24 changed files with 366 additions and 166 deletions

View File

@ -283,9 +283,9 @@ func FuzzyDecode(to interface{}, val string) bool {
v.SetUint(i)
case reflect.Bool:
switch strings.ToLower(val) {
case "true", "1", "y", "yes":
case "true", "t", "1", "y", "yes", "on":
v.SetBool(true)
case "false", "0", "n", "no":
case "false", "f", "0", "n", "no", "off":
v.SetBool(false)
default:
return false