1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-27 14:57:05 +00:00

minor changes to MVC, see HISTORY.md#Next for more

This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-08-21 20:11:14 +03:00
parent 79404f91c1
commit 9f53d15133
4 changed files with 43 additions and 4 deletions

View File

@@ -201,6 +201,9 @@ func lookupFields(elem reflect.Value, skipUnexported bool, onlyZeros bool, paren
func lookupNonZeroFieldValues(elem reflect.Value) (nonZeroFields []reflect.StructField) {
fields, _ := lookupFields(elem, true, false, nil)
for _, f := range fields {
if structFieldIgnored(f) {
continue // re-check here for ignored struct fields so we don't include them on dependencies. Non-zeroes fields can be static, even if they are functions.
}
if fieldVal := elem.FieldByIndex(f.Index); goodVal(fieldVal) && !isZero(fieldVal) {
/* && f.Type.Kind() == reflect.Ptr &&*/
nonZeroFields = append(nonZeroFields, f)