mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-01 06:33:18 +02:00
experimental homepage labels support
This commit is contained in:
@@ -58,7 +58,7 @@ func ApplyLabel[T any](obj *T, l *Label) E.NestedError {
|
||||
}
|
||||
dst, ok := field.Interface().(NestedLabelMap)
|
||||
if !ok {
|
||||
return E.Invalid("type", field.Type())
|
||||
return U.Deserialize(U.SerializedObject{nestedLabel.Namespace: nestedLabel.Value}, field.Addr().Interface())
|
||||
}
|
||||
if dst == nil {
|
||||
field.Set(reflect.MakeMap(reflect.TypeFor[NestedLabelMap]()))
|
||||
|
||||
Reference in New Issue
Block a user