Preserve terminal values during result lookup
This commit is contained in:
@@ -4,9 +4,13 @@ import "reflect"
|
||||
|
||||
func (b *schemaBuilder) describeOrdinaryField(owner *typeDescriptor, field reflect.StructField, index int, name string, secret bool, path Path) *schemaIssue {
|
||||
fieldPath := path.Key(name)
|
||||
fieldType, issue := b.describe(field.Type, fieldPath)
|
||||
if issue != nil {
|
||||
return issue
|
||||
var fieldType *typeDescriptor
|
||||
if !b.lookup {
|
||||
var issue *schemaIssue
|
||||
fieldType, issue = b.describe(field.Type, fieldPath)
|
||||
if issue != nil {
|
||||
return issue
|
||||
}
|
||||
}
|
||||
if issue := addField(owner, fieldDescriptor{name: name, index: []int{index}, descriptor: fieldType, secret: secret}, path); issue != nil {
|
||||
return issue
|
||||
|
||||
Reference in New Issue
Block a user