Skip to content

Commit

Permalink
fix Pointer issue because of recent go version
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Sep 23, 2022
1 parent 0ee4215 commit 48f39d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reflect.go
Expand Up @@ -967,7 +967,7 @@ func (r *Reflector) reflectFieldName(f reflect.StructField) (string, bool, bool,
}

// As per JSON Marshal rules, anonymous pointer to structs are inherited
if f.Type.Kind() == reflect.Pointer && f.Type.Elem().Kind() == reflect.Struct {
if f.Type.Kind() == reflect.Ptr && f.Type.Elem().Kind() == reflect.Struct {
return "", true, false, false
}
}
Expand Down

0 comments on commit 48f39d6

Please sign in to comment.