From ae58f7d11040f1eb8ec0fa4ed32d3368edd97fbf Mon Sep 17 00:00:00 2001 From: Matthieu JOOSSEN Date: Thu, 18 Feb 2021 16:31:49 +0100 Subject: [PATCH] [fix] #78 Note that a copy was made after successful copy --- copier.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/copier.go b/copier.go index 5043efa..337b26f 100644 --- a/copier.go +++ b/copier.go @@ -223,11 +223,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 {