Could adding variadic parameters to a function break existing code?
问题 Is adding a variadic parameter to an existing Go function a breaking change? For example: // Old function func Foo(a int) // Updated to: func Foo(a int, params ...string) Callers of the API can omit the new parameter, so I would think the API is backwards-compatible. Can anyone provide an example where a user of the old API could not use the new API without changing their code? 回答1: I. Changing functions Calling them will continue to work without modification, but since the function