regsiter: fix extractor

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-03-12 16:09:20 +03:00
parent bac9869bb3
commit 723ceb4f32

View File

@ -24,7 +24,7 @@ func ExtractValue(v reflect.Type, d int) *Value {
}
// slices and maps don't have a defined name
if v.Kind() != reflect.Slice && v.Kind() != reflect.Map && len(v.Name()) == 0 {
if (v.Kind() == reflect.Slice || v.Kind() == reflect.Map) || len(v.Name()) == 0 {
return nil
}