fix tag ignored issue

Signed-off-by: jason yang <jasonyangshadow@gmail.com>
This commit is contained in:
jason yang
2024-01-19 02:46:27 +00:00
committed by Jonathon Anderson
parent 7d17bcc6fa
commit d0b396b89c
3 changed files with 72 additions and 0 deletions

View File

@@ -206,6 +206,11 @@ func recursiveSetter(source, target interface{}, nameArg string, setter func(*En
newEntr := new(Entry)
setter(newEntr, sourceIter.Value().String(), nameArg)
targetValue.Elem().Field(i).SetMapIndex(sourceIter.Key(), reflect.ValueOf(newEntr))
} else {
// update the entry with latest value
if entry, ok := targetValue.Elem().Field(i).MapIndex(sourceIter.Key()).Interface().(*Entry); ok {
setter(entry, sourceIter.Value().String(), nameArg)
}
}
}
} else {