skip unexported fields for bindings

This commit is contained in:
Martin Karlsch 2014-09-18 12:22:44 +02:00
parent 0808f8a824
commit 9a8621cea1

View File

@ -174,6 +174,11 @@ func Validate(obj interface{}) error {
continue
}
// skip unexported fields
if field.PkgPath != "" {
continue
}
fieldValue := val.Field(i).Interface()
zero := reflect.Zero(field.Type).Interface()