【笔记】Go接收任意类型参数

前言

Go接收任意类型参数

接收单个任意类型参数

1
2
3
func method(arg interface{}) {
...
}

接收多个任意类型参数

1
2
3
func method(arg []interface{}) {
...
}

完成

参考文献

CSDN——潘广宇