на выходе получаю моки по всем интерфейсам в пакете, как пофиксить?
//go:generate go run go.uber.org/mock/mockgen@latest -source=source.go -destination=mocks/source_mock.go -package=mocks First
type First interface {
A()
}
type Second interface {
B()
}
кажется так -mock_names: A list of custom names for generated mocks. This is specified as a comma-separated list of elements of the form Repository=MockSensorRepository,Endpoint=MockSensorEndpoint, where Repository is the interface name and MockSensorRepository is the desired mock name (mock factory method and mock recorder will be named after the mock). If one of the interfaces has no custom name specified, then default naming convention will be used.
t.me/gogolang
Обсуждают сегодня