Dave Cheney

Results 267 comments of Dave Cheney

Thank you for this suggestion. I understand what you want to implement, but I do not understand _why_. Can you show me how a caller of `Pop` would use the...

@tux-eithel thanks for your comment. I don't think your sample code works because the errors returned from this package cannot be compared for equality. This is by design.

You can write `errors.Pop` yourself ``` go if err, ok := err.(interface{Cause() error}); ok { cause := err.Cause() /// } ```

The file should be closed when stop is called. Do you see this line in the output of your program? https://github.com/pkg/profile/blob/master/profile.go#L211

Thanks for your issue. Something which is underdocuumented and arguably shouldn't be optional is the profile.ProfilePath option function. If you use ``` defer profile.Start(profile.ProfilePath(".")).Stop() ``` It will write `cpu.pprof` to...

This package follows Rob Pike's functional options pattern. If there is a particular option you want to see added to this package, please raise it as a request or send...

errors.Unwraps only unwraps errors wrapper with errors.Wrap, not fmt.Errorf

Unwrap is just a wrapper around the stdlib errors package's Unwrap. https://github.com/pkg/errors/blob/master/go113.go

> produces "extra details: baseErr" which I'm not used to but it seems to be the canonical way of wrapping errors in Go. yup, the usual form is 'outer most:...

Maybe `errors.Wrap` is not what you want. It feels like you are trying to create a side channel to send extra data related to the _path_ the code took to...