You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a similar use-case, but I'm using null.* (v4) for PATCH requests, so almost every field is null and I'd like to copy only what has changed:
typeUpdateNewsRequeststruct {
Title null.StringDescription null.String
}
typeNewsstruct {
IDuintTitlestringDescriptionstring
}
I'm trying to see if there is a way to use the context method to do this, and while deepcopier.Copy(&updateRequest).To(&dbModel) does not return any errors, it also does not update the fields.
Is there a way to copy only the not null fields?
Example:
I get:
I would:
Is this possible?
The text was updated successfully, but these errors were encountered: