Chore: Enable more go-ruleguard rules (#29781)

* Chore: Enable more go-ruleguard rules

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-12-14 15:51:59 +01:00
committed by GitHub
parent e33c7cfbd2
commit 3fdf4be529
8 changed files with 56 additions and 62 deletions
+4 -1
View File
@@ -95,7 +95,10 @@ func perFloat(e *State, val Value, floatF func(x float64) float64) (Value, error
newVal = NewScalar(e.RefID, &nF)
case parse.TypeSeriesSet:
resSeries := val.(Series)
newSeries := NewSeries(e.RefID, resSeries.GetLabels(), resSeries.TimeIdx, resSeries.TimeIsNullable, resSeries.ValueIdx, resSeries.ValueIsNullabe, resSeries.Len())
newSeries := NewSeries(
e.RefID, resSeries.GetLabels(), resSeries.TimeIdx, resSeries.TimeIsNullable, resSeries.ValueIdx,
resSeries.ValueIsNullable, resSeries.Len(),
)
for i := 0; i < resSeries.Len(); i++ {
t, f := resSeries.GetPoint(i)
nF := math.NaN()