moq/pkg
Suhas Karanth 4638a53893
No variadic return types (#126)
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.
2020-06-07 18:15:40 +05:30
..
moq No variadic return types (#126) 2020-06-07 18:15:40 +05:30
vendor/github.com/matryer/somerepo Add static interface implementation check 2019-01-17 20:20:37 +01:00