4638a53893
While extracting the method and parameters from the method signature, only check and apply the variadic flag for the input parameters and not for the return arguments. Issue details: For an interface with variadic arguments and slice return type, moq was generating an invalid mock: type I interface { Func(params ...interface{}) []byte } // ... type IMock struct { // FuncFunc mocks the Func method. FuncFunc func(params ...interface{}) ...byte // calls tracks calls to the methods. calls struct { // Func holds details about calls to the Func method. Func []struct { // Params is the params argument value. Params []interface{} } } } On attempting to generate the mock in such an instance, the command would fail on the formatting step: m.Mock: go/format: 35:30: expected ';', found '...' (and 3 more errors) See https://github.com/matryer/moq/issues/124, https://github.com/matryer/moq/pull/125. |
||
---|---|---|
.. | ||
moq | ||
vendor/github.com/matryer/somerepo |