From f8ba4ea2b4acb0ae77e3166d406eb344d16cc2ab Mon Sep 17 00:00:00 2001 From: odrling Date: Wed, 17 Jul 2024 11:59:08 +0200 Subject: [PATCH] parse SECURE=FAlsE as false bool --- server/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/config.go b/server/config.go index 8275380..9c529fb 100644 --- a/server/config.go +++ b/server/config.go @@ -7,6 +7,7 @@ import ( "os" "reflect" "strconv" + "strings" ) type ProducerListenConfig struct { @@ -77,7 +78,7 @@ func setConfigValue(config_value reflect.Value, config_type reflect.Type, prefix field.SetInt(int64(int_value)) case reflect.Bool: value := getFieldValue(field_type, prefix) - field.SetBool(value != "" && value != "false" && value != "0") + field.SetBool(value != "" && strings.ToLower(value) != "false" && value != "0") case reflect.Struct: field_prefix := prefix + field_type.Tag.Get("env_prefix") + "_" setConfigValue(field, field_type.Type, field_prefix)