I just saw this thread after replying to the other one.
Fundamentally, I think comparing errors for equality
is misguided. That said, a simple approach that
doesn't use DeepEquals is possible:

func sameError(e1, e2 error) bool {
    defer func() { recover() }()
    return e1 == e2
}

On 28 May 2014 05:16, Tim Penhey <tim.pen...@canonical.com> wrote:
> On 28/05/14 15:48, John Meinel wrote:
>> I think we need concrete examples which Tim should have in the test suite.
>>
>> John
>> =:->
>>
>> On May 28, 2014 6:50 AM, "Andrew Wilkins" <andrew.wilk...@canonical.com
>> <mailto:andrew.wilk...@canonical.com>> wrote:
>>
>>     On Wed, May 28, 2014 at 10:39 AM, John Meinel
>>     <j...@arbash-meinel.com <mailto:j...@arbash-meinel.com>> wrote:
>>
>>         The address of the real value is the same.
>>
>>     Are you referring to the backing array? That is not what is being
>>     compared, so that's not a useful property.
>
> FWIW, replacing the icky unsafe bits with reflect.DeepEqual does work
> but it just leaves me with an icky taste in my mouth.
>
> Admittedly less icky than the unsafe work.
>
> Tim
>
>
> --
> Juju-dev mailing list
> Juju-dev@lists.ubuntu.com
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/juju-dev

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to