For example i have dao with 20 methods.
type UserDao interface {
GetUser() (User, error)
GetUsers() ([]User, error)
...
}
And i want create mock for tests and use only one method.
type UserDaoMock struct { }
fucn (UserDaoMock) GetUser() (User, error) {
return User{}
}
There is a way to don't implements other methods before using UserDaoMock as a UserDao in tests? Tell the compiler that this is how it should be?