Is there anything wrong with an interface with more that one function assigned to it ?
Everywhere I read, an interface should ideally have only one method (which is what the interface should be named after). But are there any pit falls to having more than one method for an interface ? Ex.
type FooMgrInterface interface {
CreateFoo(hostname string, fooConfig interface{}) (uuid string, err error)
DeleteFoo(hostname string, fooID string) (err error)
CreateBar(hostname string, barID string, barConfig interface{}) (uuid string, err error)
DeleteBar(hostname string, barID string) (err error)
AttachBar(hostname string, fooID string, bars []string) (err error)
DetachBar(hostname string, barID string) (err error)
GetBars(hostname string) (bars []Bar, err error)
GetBar(hostname string, barID string) (bar Bar, err error)
GetFoo(hostname string, fooID string) (foo Foo, err error)
GetFoos(hostname string) (foos []Foo, err error)
}
If so how could the above interface be simplified or (maybe) split into multiple interfaces ?