I want a single instance of a client handle to be initialized.

Is it ok to declare the instance as

var client MetricsClient

and then initialize it using sync.Once().

Is it required for some reason that the client be a pointer  or are there 
are other issues with it. My requirement is to be able to initialize that 
handle just once 

-- 
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