golang any转换为其他类型
func SUM(nums ...any) any {
switch nums[0].(type) {
case int:
var total int
for _, num := range nums {
op, _ := num.(int)
total += op
//fmt.Println(op, ok)
}
return total
}
return nil
}