From 3967a644b96cc46febce2497c8d952ecdcc6b3f4 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Wed, 11 Aug 2021 11:38:55 +0800 Subject: [PATCH] fix golint issues (#899) --- core/mapping/unmarshaler.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/mapping/unmarshaler.go b/core/mapping/unmarshaler.go index b1ea2dbbdbf0..35a61de10eaa 100644 --- a/core/mapping/unmarshaler.go +++ b/core/mapping/unmarshaler.go @@ -518,14 +518,14 @@ func (u *Unmarshaler) fillSliceValue(slice reflect.Value, index int, baseKind re target.Set(reflect.ValueOf(value)) ithVal.Set(target.Addr()) return nil - } else { - if ithVal.Kind() != reflect.TypeOf(value).Kind() { - return errTypeMismatch - } + } - ithVal.Set(reflect.ValueOf(value)) - return nil + if ithVal.Kind() != reflect.TypeOf(value).Kind() { + return errTypeMismatch } + + ithVal.Set(reflect.ValueOf(value)) + return nil } }