mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Add more options for Booleans
This commit is contained in:
@@ -684,8 +684,10 @@ func lexMapEnd(lx *lexer) stateFn {
|
||||
|
||||
// Checks if the unquoted string was actually a boolean
|
||||
func (lx *lexer) isBool() bool {
|
||||
str := lx.input[lx.start:lx.pos]
|
||||
return str == "true" || str == "false" || str == "TRUE" || str == "FALSE"
|
||||
str := strings.ToLower(lx.input[lx.start:lx.pos])
|
||||
return str == "true" || str == "false" ||
|
||||
str == "on" || str == "off" ||
|
||||
str == "yes" || str == "no"
|
||||
}
|
||||
|
||||
// Check if the unquoted string is a variable reference, starting with $.
|
||||
|
||||
Reference in New Issue
Block a user