I often put all of my wire-up in main which ensures that it's only one instance. Then I create a struct that all of the dependencies hang off of like loggers and clients. On Thu, 30 Jun 2016 at 23:30, Val <delepl...@gmail.com> wrote:
> Indeed. > I find it weird that the authors care more about lazy init (not strictly > required for singletons) than about ensuring properly that multiple > instanciation cannot happen. > > -- > 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. > -- 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.