Fwd: New checker "jc.IsNil"
John Meinel
john at arbash-meinel.com
Mon Nov 24 04:34:37 UTC 2014
>
> ...
>
> IFAICT we have four options:
>
> * gc.Assert(err, gc.Equals, nil)
> * write an explicit nil checker that *ONLY* passes for '== nil'
> * write an explicit error nil checker
> * do nothing, continue using jc.IsNil and code reviews
>
> I'm probably, -1, -1, +0, and +1 respectively on the above options.
>
> Curious about others.
>
> Tim
>
I don't quite understand how 2 is different than gc.IsNil given the need to
have interface{} for any checker you would write.
I don't particularly like that we can return not-nil nil's for errors
(sometimes) so it would be nice to trap for those, but I'm not sure we have
great ways to do so.
I'm curious as to your thoughts about GoString, is it just because that is
intended to return the "how do I create one of these" strings, which isn't
true if you override it?
John
=:->
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20141124/82975253/attachment.html>
More information about the Juju-dev
mailing list