diff --git a/config/config.go b/config/config.go index 6ed5eea..3cb7e14 100644 --- a/config/config.go +++ b/config/config.go @@ -169,6 +169,10 @@ func (m *Manager) validateObject(obj interface{}) error { field := objValue.Field(i) fieldType := objType.Field(i) + if !field.CanInterface() { + continue + } + // If field is a struct or pointer to a struct, recurse if field.Kind() == reflect.Struct || (field.Kind() == reflect.Ptr && field.Elem().Kind() == reflect.Struct) { if field.Kind() == reflect.Ptr && field.IsNil() {