mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-13 05:27:31 +01:00
Add missing case for type []int32
This commit is contained in:
parent
c3004f8c6d
commit
89c93185d4
@ -123,6 +123,13 @@ func avgfunc(args interface{}) (interface{}, error) {
|
|||||||
s += x
|
s += x
|
||||||
}
|
}
|
||||||
return s / int64(len(values)), nil
|
return s / int64(len(values)), nil
|
||||||
|
case []int32:
|
||||||
|
var s int32 = 0
|
||||||
|
for _, x := range values {
|
||||||
|
s += x
|
||||||
|
}
|
||||||
|
return s / int32(len(values)), nil
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0.0, nil
|
return 0.0, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user