Thanks Ian, this does not work as I mentioned because there is no way to
guarantee that my init function will run before any of my libraries
creating a time object (which many do as they start various background
tasks).
Doing what you say is fragile because even if it appears to work, one day I
mi
tle bug just waiting to bite.
Thanks
Michael.
On Wednesday, 9 May 2018, Ian Lance Taylor wrote:
> On Tue, May 8, 2018 at 7:19 AM, Michael Cohen wrote:
> >
> > Well no - the error I get is that I am attempting to call String()
> method on
> > a null receiver - so the caller j
Well no - the error I get is that I am attempting to call String() method
on a null receiver - so the caller just passed me a regular nil object. The
issue is that I am trying to make a generic polymorphic function which
should be able to handle whatever is thrown at it - so I guess reflect is
nece