Browse Source

fix golint issues (#899)

Kevin Wan 3 năm trước cách đây
mục cha
commit
e024aebb66
1 tập tin đã thay đổi với 6 bổ sung6 xóa
  1. 6 6
      core/mapping/unmarshaler.go

+ 6 - 6
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
 	}
 }