Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9b4d4c5 authored by Aditya Kumar's avatar Aditya Kumar Committed by Gerrit Code Review
Browse files

Merge "IsEnvTrue and IsEnvFalse should take `True` and `False` as valid values...

Merge "IsEnvTrue and IsEnvFalse should take `True` and `False` as valid values respectively." into main
parents dbd91b03 19384103
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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"
}