mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-11 03:06:51 +02:00
fixed homepage not respecting homepage.show field, disabled schema validation for included file
This commit is contained in:
@@ -58,7 +58,14 @@ func ApplyLabel[T any](obj *T, l *Label) E.NestedError {
|
||||
}
|
||||
dst, ok := field.Interface().(NestedLabelMap)
|
||||
if !ok {
|
||||
return U.Deserialize(U.SerializedObject{nestedLabel.Namespace: nestedLabel.Value}, field.Addr().Interface())
|
||||
if field.Kind() == reflect.Ptr {
|
||||
if field.IsNil() {
|
||||
field.Set(reflect.New(field.Type().Elem()))
|
||||
}
|
||||
} else {
|
||||
field = field.Addr()
|
||||
}
|
||||
return U.Deserialize(U.SerializedObject{nestedLabel.Namespace: nestedLabel.Value}, field.Interface())
|
||||
}
|
||||
if dst == nil {
|
||||
field.Set(reflect.MakeMap(reflect.TypeFor[NestedLabelMap]()))
|
||||
|
||||
Reference in New Issue
Block a user