I'm learning go by writing a small middleware system.
End points can be consumers or producers
I've just started to model this with interfaces
type Endpter interface {
GetName() string
GetEndPtType() string
}
type Consumer interface {
GetName() string
GetEndPtType() string
IsConsumer() bool
}
type Producer interface {
GetName() string
GetEndPtType() string
IsProducer() bool
}
So what I have is overlaping interfaces that have some methods in common.
Is there some reason to avoid this or not?
Thanks
Eric
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.