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
I haven't seen any code or a description of what you're doing, so it's
really hard for me to help.
Broadly, what are you trying to accomplish? Maybe we can help avoid the
need to do something that Go doesn't support well.
On Tue, May 27, 2014 at 9:43 PM, Tim Penhey
On 28/05/14 12:43, Nate Finch wrote:
This sounds like one of those if you have to ask this question, you're
doing something wrong.
Can you give an example of where we need this?
Sure... let's say we have a stack of errors, for simplicity of the
argument lets say it is a slice of error
On 28/05/14 13:31, Nate Finch wrote:
If you're talking about errgo, if all we care about is transition, but
not what the actual types are, we could just record in the list when we
mask the type.
We could, but that would mean walking the list every time you want to
check the cause. It would
On Wed, May 28, 2014 at 8:47 AM, Tim Penhey tim.pen...@canonical.comwrote:
On 28/05/14 12:43, Nate Finch wrote:
This sounds like one of those if you have to ask this question, you're
doing something wrong.
Can you give an example of where we need this?
Sure... let's say we have a stack
On 28/05/14 13:48, Andrew Wilkins wrote:
On Wed, May 28, 2014 at 8:47 AM, Tim Penhey tim.pen...@canonical.com
mailto:tim.pen...@canonical.com wrote:
On 28/05/14 12:43, Nate Finch wrote:
This sounds like one of those if you have to ask this question,
you're
doing something
On Wed, May 28, 2014 at 9:52 AM, Tim Penhey tim.pen...@canonical.comwrote:
On 28/05/14 13:48, Andrew Wilkins wrote:
On Wed, May 28, 2014 at 8:47 AM, Tim Penhey tim.pen...@canonical.com
mailto:tim.pen...@canonical.com wrote:
On 28/05/14 12:43, Nate Finch wrote:
This sounds like
On Wed, May 28, 2014 at 10:39 AM, John Meinel j...@arbash-meinel.comwrote:
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.
John
=:-
On May 28, 2014 6:04 AM, Andrew Wilkins
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
wrote:
On Wed, May 28, 2014 at 10:39 AM, John Meinel j...@arbash-meinel.comwrote:
The address of the real value is the same.
Are you
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
10 matches
Mail list logo