diff --git a/config/config.go b/config/config.go index ab251ee..e034f15 100644 --- a/config/config.go +++ b/config/config.go @@ -7,6 +7,7 @@ import ( "os/exec" "reflect" "strconv" + "strings" "time" ) @@ -119,6 +120,11 @@ func loadEnvVariables(cfg interface{}) { if value, err := strconv.ParseBool(envValue); err == nil { v.Field(i).SetBool(value) } + case reflect.Slice: + if field.Type.Elem().Kind() == reflect.String { + envValueSlice := strings.Split(envValue, ",") + v.Field(i).Set(reflect.ValueOf(envValueSlice)) + } } } }