IsEnvTrue and IsEnvFalse should take True
and False
as valid values respectively.
Change-Id: Ibca5800c0846a45e3811db76fb5ad46b8a7eb1c1
This commit is contained in:
parent
1f0aeb0644
commit
1938410342
1 changed files with 2 additions and 2 deletions
|
@ -813,12 +813,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