Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

What is the reason behind stacktrace being private? #66

Closed
m0sth8 opened this issue Jun 30, 2016 · 6 comments
Closed

What is the reason behind stacktrace being private? #66

m0sth8 opened this issue Jun 30, 2016 · 6 comments

Comments

@m0sth8
Copy link

m0sth8 commented Jun 30, 2016

According to errors pkg documentation to retrieve the stack trace of an error or wrapper I should try to use interface:

type stackTracer interface { StackTrace() errors.StackTrace }

The stackTracer interface is private. Does it mean, that you don't want it to be an API for errrors library and it can change its behaviour?

@AlekSi
Copy link
Contributor

AlekSi commented Jun 30, 2016

The same question about Causer. Is it a part of public API? If yes, can this be documented explicitly like:

Any error value which implements this interface (which is considered to be a part of public API)…

@davecheney
Copy link
Member

That example is for documentation only. If I could remove the name of the type and leave the example as clear I would have.

If you, the caller, want to assert the type has that behaviour, define an interface or declare one inline and do he type assertion.

@davecheney
Copy link
Member

Please send a pr to document causer, this is an oversight. Thanks

@davecheney
Copy link
Member

Closed, duplicate of #71

@AlekSi
Copy link
Contributor

AlekSi commented Jul 19, 2016

But #69 is still open.

@davecheney
Copy link
Member

Thanks for bringing that to my attention.

On Tue, Jul 19, 2016 at 7:09 PM, Alexey Palazhchenko <
notifications@github.com> wrote:

But #69 #69 is still open.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#66 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAcA0p2pQdJPTg9hKKrgT2orJnd5z4mks5qXJRCgaJpZM4JCRfD
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants