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 would like to have option to add custom rules for copying fields. Lets say we have date and time separate fields. I would like to copy them as merged.
typeFromstruct {
datestringtimestring
}
typeTostruct {
datetime time.Time
}
func (t*To) FromDateTime(f*From) error {
x:=//... logic to merge and convert datetime here
t.datetime=x
}
Motivation
Feels like this would be possible already if parameter to receiving function would get the reference to From struct.
Describe the feature
Ability to merge/join multiple fields into one.
I would like to have option to add custom rules for copying fields. Lets say we have date and time separate fields. I would like to copy them as merged.
Motivation
Feels like this would be possible already if parameter to receiving function would get the reference to
From
struct.Related Issues
The text was updated successfully, but these errors were encountered: