fix: gosec check

This commit is contained in:
naiba 2022-05-02 00:53:39 +08:00
parent c4609f02f7
commit a199d0134a

View File

@ -9,11 +9,11 @@ type ServiceItemResponse struct {
Down *[30]int Down *[30]int
} }
func sum[T int | float32](slice *[30]T) T { func sum(slice *[30]int) int {
if slice == nil { if slice == nil {
return 0 return 0
} }
var sum T var sum int
for _, v := range *slice { for _, v := range *slice {
sum += v sum += v
} }