mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
fix: gosec
check
This commit is contained in:
parent
c4609f02f7
commit
a199d0134a
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user