From 7086fb6dda89939caf96187e519ef04422777431 Mon Sep 17 00:00:00 2001 From: MarkJoyMa Date: Thu, 2 Mar 2023 21:54:09 +0800 Subject: [PATCH] x --- core/mapping/unmarshaler.go | 2 +- core/mapping/unmarshaler_test.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/mapping/unmarshaler.go b/core/mapping/unmarshaler.go index fe638ce1..f8674211 100644 --- a/core/mapping/unmarshaler.go +++ b/core/mapping/unmarshaler.go @@ -712,7 +712,7 @@ func (u *Unmarshaler) processNamedField(field reflect.StructField, value reflect valuer := createValuer(m, opts) mapValue, hasValue := getValue(valuer, canonicalKey) - // When fillDefault is used, m is a null value, hasValue must be false, all priority judgments fillDefault, + // When fillDefault is used, m is a null value, hasValue must be false, all priority judgments fillDefault. if u.opts.fillDefault { if !value.IsZero() { return fmt.Errorf("set the default value, %s must be zero", fullName) diff --git a/core/mapping/unmarshaler_test.go b/core/mapping/unmarshaler_test.go index d2e6fc09..cdd7b98a 100644 --- a/core/mapping/unmarshaler_test.go +++ b/core/mapping/unmarshaler_test.go @@ -12,7 +12,6 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" - "github.com/zeromicro/go-zero/core/stringx" )