You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
typeClient[Tany, P types.Model[T]] interface {
Create(*P) error
}
The generated mock is like this
// MockClient is a mock of Client interface.typeMockClient[Tany, P types.Model[client.T]] struct {
ctrl*gomock.Controllerrecorder*MockClientMockRecorder[T, P]
}
// MockClientMockRecorder is the mock recorder for MockClient.typeMockClientMockRecorder[Tany, P types.Model[client.T]] struct {
mock*MockClient[T, P]
}
// NewMockClient creates a new mock instance.funcNewMockClient[Tany, P types.Model[client.T]](ctrl*gomock.Controller) *MockClient[T, P] {
mock:=&MockClient[T, P]{ctrl: ctrl}
mock.recorder=&MockClientMockRecorder[T, P]{mock}
returnmock
}
Expected behavior A clear and concise description of what you expected to
happen.
The argument for the P should be T, not the client.T.
// MockClient is a mock of Client interface.
type MockClient[T any, P types.Model[T]] struct {
ctrl *gomock.Controller
recorder *MockClientMockRecorder[T, P]
}
Actual behavior A clear and concise description of what the bug is.
For the interface with generics
The generated mock is like this
Expected behavior A clear and concise description of what you expected to
happen.
The argument for the P should be T, not the
client.T
.To Reproduce Steps to reproduce the behavior
Additional Information
Triage Notes for the Maintainers
The text was updated successfully, but these errors were encountered: