when building an interface in go the common example looks like:
type Notifier interface {
Notify()
}
The doc sees to say stuff like... add the 'er' version of the verb to the type name. Now since the method name and the interface name are similar having multiple methods in the definition would not makes sense.
I'm trying:
type Commander interface {
Command()
Notify()
}
it works in all the odd ways you'd expect but it seems wrong and there is nothing preventing me from doing this. I'm just not sure if I should be chaining the commands and what that might look like deeper in the code.
type Commander interface {
Command()
}
type Notifier interface {
Notify()
}
But the idea of calling my function:
DoStuff(c, n)
when a single param that implements both interfaces would make sense too.