Skip to content

Explicitly forward metricVec methods Collect, Describe, Reset #714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2020

Conversation

beorn7
Copy link
Member

@beorn7 beorn7 commented Feb 13, 2020

Interestingly, methods implicitly forwarded from embedded types are
detected by GoDoc if they are just one level deep. Methods of embedded types in
the embedded type are not recognized. This commit therefore adds
explicit forwarding methods for Collect, Describe, and Reset.

@bwplotka I discovered that while working on the promauto changes. Please have a look, easy review. (o:

Interestingly, methods implicitly forwarded from embedded types are
detected by GoDoc if they are just one level deep. Embedded types in
the embedded type are not recognized. This commit therefore adds
explicit forwarding methods for Collect, Describe, and Reset.

Signed-off-by: beorn7 <beorn@grafana.com>
@beorn7 beorn7 requested a review from bwplotka February 13, 2020 19:26
Copy link
Member

@roidelapluie roidelapluie left a comment

Choose a reason for hiding this comment

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

Maybe we should fill a bug report upstream too.

@beorn7
Copy link
Member Author

beorn7 commented Feb 13, 2020

There are plenty of related bugs: golang/go#2971 golang/go#6127 golang/go#6600 … it seems to be a complicated and hairy topic.

@beorn7 beorn7 merged commit 110f6d4 into master Feb 13, 2020
@beorn7 beorn7 deleted the beorn7/doc branch February 13, 2020 20:01
@roidelapluie
Copy link
Member

roidelapluie commented Feb 13, 2020

Thanks for digging, at least now we have some references.

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

Successfully merging this pull request may close these issues.

2 participants