What's the best practice around handling embedded interfaces that are nil?

For example:

https://play.golang.org/p/EcqV7h9cNU

Is there a better way than wrapping the embedded interface's methods and 
forwarding down as long as it's not nil?

I guess another approach would be to create a NoOpEventLog in the 
NewService() function which would ignore any calls to service.SaveEvent().  

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to