Skip to content

Commit

Permalink
Merge pull request #81 from matthieujoossen/fix/78_hasCopied
Browse files Browse the repository at this point in the history
[fix] #78 Note that a copy was made after successful copy
  • Loading branch information
jinzhu authored Mar 9, 2021
2 parents 46cc1a5 + ae58f7d commit 0439967
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions copier.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,10 @@ func copier(toValue interface{}, fromValue interface{}, opt Option) (err error)
if err := copier(toField.Addr().Interface(), fromField.Interface(), opt); err != nil {
return err
}
} else {
if fieldFlags != 0 {
// Note that a copy was made
tagBitFlags[name] = fieldFlags | hasCopied
}
}
if fieldFlags != 0 {
// Note that a copy was made
tagBitFlags[name] = fieldFlags | hasCopied
}
}
} else {
Expand Down

0 comments on commit 0439967

Please sign in to comment.