如何在中传递可变长度参数Go?例如,我想打电话
func MyPrint(format string, args ...interface{}) {
fmt.Printf("[MY PREFIX] " + format, ???)
}
// to be called as: MyPrint("yay %d", 213)
// or MyPrint("yay")
// or MyPrint("yay %d %d",123,234)
www说
相关分类