diff --git a/util/config.go b/util/config.go index 7b569f98..77fb32e4 100644 --- a/util/config.go +++ b/util/config.go @@ -256,6 +256,10 @@ func loadDefaultsToObject(obj interface{}) error { v = reflect.Indirect(v) } + if v.Type().Kind() != reflect.Struct { + return nil + } + for i := 0; i < t.NumField(); i++ { fieldType := t.Field(i) fieldValue := v.Field(i)