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

Make example interfaces unnamed #55

Closed
wants to merge 1 commit into from
Closed

Conversation

davecheney
Copy link
Member

To avoid bike shedding over the name, and make it clear that these
interface defintions are not provided by this package.

To avoid bike shedding over the name, and make it clear that these
interface defintions are _not_ provided by this package.
@davecheney
Copy link
Member Author

/cc @kr

@seh
Copy link
Contributor

seh commented Jun 16, 2016

I am happy to see this change. I've found this technique of showing notional interfaces that are not actually defined by the name to be confusing. Clients of the library can't actually refer to that name, nor even find it in the source code apart from in a comment. Better is to omit the name as you've done here.

@@ -59,7 +59,7 @@
// New, Errorf, Wrap, and Wrapf record a stack trace at the point they are
// invoked. This information can be retrieved with the following interface.
//
// type StackTrace interface {
// interface {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the example cast that mentions the StackTrace type a few lines down? Should that change as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, that does make things complicated.

@davecheney
Copy link
Member Author

Abandoned.

@ser @kr if you want to send a PR to change the suffix please do so, making the type private for good measure. Please also change the declaration in example_test.go

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

Successfully merging this pull request may close these issues.

2 participants