Merge "IsEnvTrue and IsEnvFalse should take True
and False
as valid values respectively." into main
This commit is contained in:
commit
c9b4d4c584
1 changed files with 2 additions and 2 deletions
|
@ -818,12 +818,12 @@ func (c *config) GetenvWithDefault(key string, defaultValue string) string {
|
|||
}
|
||||
|
||||
func (c *config) IsEnvTrue(key string) bool {
|
||||
value := c.Getenv(key)
|
||||
value := strings.ToLower(c.Getenv(key))
|
||||
return value == "1" || value == "y" || value == "yes" || value == "on" || value == "true"
|
||||
}
|
||||
|
||||
func (c *config) IsEnvFalse(key string) bool {
|
||||
value := c.Getenv(key)
|
||||
value := strings.ToLower(c.Getenv(key))
|
||||
return value == "0" || value == "n" || value == "no" || value == "off" || value == "false"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue