소스 검색

fix golint issues (#899)

Kevin Wan 3 년 전
부모
커밋
e024aebb66
1개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  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
 	}
 }