golang泛型
泛型go1.18版本开始支持在函数上使用[T 支持的类型] 表示泛型,比如func AddSum[T int|float64](params ...T)(sum T){ // 一些操作 return sum}自带泛型:any 表示任何类型,即interfacecomparable 表示可以被比较的类型comparable is an interface that is implemented by all comparable types(booleans, numbers,










