Skip to content

Commit

Permalink
Handle interface type properly in clone method
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mizutani committed Feb 19, 2024
1 parent a839a28 commit 4938773
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ func (x *masq) clone(fieldName string, src reflect.Value, tag string) reflect.Va
dst.Elem().Set(copied)
return dst

case reflect.Interface:
return x.clone(fieldName, src.Elem(), tag)

default:
dst := reflect.New(src.Type())
dst.Elem().Set(src)
Expand Down

0 comments on commit 4938773

Please sign in to comment.