IsEnvTrue and IsEnvFalse should take True and False as valid values respectively.

Change-Id: Ibca5800c0846a45e3811db76fb5ad46b8a7eb1c1
This commit is contained in:
AdityaK 2024-05-01 13:51:25 -07:00
parent 1f0aeb0644
commit 1938410342

View file

@ -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"
}