Dave Cheney
Dave Cheney
I think if you want to profile how much time is spent in the various parts of the program over time, start a profile at the top of main, run...
This package lets you turn on profiling for a section of time then emit a profile. The defer start().stop() example is just that, an example. You could do something like...
Thank you for raising this issue. Before we jump to solutions, can you explain why this is a problem?
As far as I understand this should work as the method sets of the anonymous and named interface as the same https://play.golang.org/p/UVPn8HHZ-37
Could you show me what you’ve tried? Maybe we can fix it?
> I felt it would be better if the anonymous interface has a name then i wont have to duplicate the interface definition as a consumer. No, that's the wrong...
You only need to call Wrap when you have extra context to return. I'm not concerned about the cost of calling Wrap in the error path. Please see this blog...
> I agree that the behaviour is not the expected one. If I do errors.Wrap(err, "more context"), and err already has a stacktrace, I don't want to add more stacktrace...
@benma > ... and I dislike having every error have an enormous stacktrace with almost all of it being duplication. So don't call `Wrap`. > I think it's not possible...
@cep21 > > I can equally see a need too add a strack trace for each wrap > > Don't you agree that's strongly overstated? Nope. I've had people on...