Allow value prefixed with bang to skip parsing

This commit is contained in:
Dan Jones 2024-10-31 14:31:16 -05:00
commit a8cbfd087f
2 changed files with 8 additions and 0 deletions

View file

@ -17,6 +17,10 @@ func ParseString(in string) any {
return s
}
if strings.HasPrefix(s, "!") {
return strings.TrimPrefix(s, "!")
}
yesno := regexp.MustCompile("^(y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)$")
yes := regexp.MustCompile("^(y|Y|yes|Yes|YES|true|True|TRUE|on|On|ON)$")
null := regexp.MustCompile("^(~|null|Null|NULL|none|None|NONE|nil|Nil|NIL)$")