From a199d0134a41ef567769a11c1d60855900b4b0ce Mon Sep 17 00:00:00 2001 From: naiba Date: Mon, 2 May 2022 00:53:39 +0800 Subject: [PATCH] fix: `gosec` check --- model/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/api.go b/model/api.go index fb7a291..e224e67 100644 --- a/model/api.go +++ b/model/api.go @@ -9,11 +9,11 @@ type ServiceItemResponse struct { Down *[30]int } -func sum[T int | float32](slice *[30]T) T { +func sum(slice *[30]int) int { if slice == nil { return 0 } - var sum T + var sum int for _, v := range *slice { sum += v }