Upon reflection, I would make the following improvements to bring the interfaces closer to Go's philosophical ideals:
* Remove the App interface because it only has one implementation * Remove the Named interface because all its usages seem to be replaceable with a package-scoped const * Split the Runnable interface into Runner and Shutdowner (inspired by Reader/Writer) with the advice not to use Shutdowner if context-based shutdown is sufficient Redesigned interfaces: ``` type Runner interface { Run(ctx context.Context) error } // Shutdowner adds a Shutdown method for services whose shutdown procedure needs to be cancellable. type Shutdowner interface { Shutdown(ctx context.Context) error } ``` -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/5558d654-50f0-456a-a2a3-620fd85e65cen%40googlegroups.com.