Skip to content
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

[chore] use a pointer receiver to fix warning #24226

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Jul 12, 2023

No description provided.

@atoulme atoulme requested a review from a team July 12, 2023 05:49
@atoulme atoulme requested a review from dmitryax as a code owner July 12, 2023 05:49
@github-actions github-actions bot added the cmd/mdatagen mdatagen command label Jul 12, 2023
Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

What is the warning being fixed by this?

@atoulme
Copy link
Contributor Author

atoulme commented Jul 13, 2023

IntelliJ displays the following warning:

Struct Status has methods on both value and pointer receivers. Such usage is not recommended by the Go Documentation.

@dmitryax
Copy link
Member

Do we have any other methods on the Status struct?

@atoulme
Copy link
Contributor Author

atoulme commented Jul 13, 2023

Yes,
func (s *Status) validateClass() error and func (s *Status) validateStability() error

@mx-psi
Copy link
Member

mx-psi commented Jul 13, 2023

IntelliJ displays the following warning:

Struct Status has methods on both value and pointer receivers. Such usage is not recommended by the Go Documentation.

Would be good to have a linter that verifies this, although I haven't been able to find one 🤔 In any case, we can merge this without the linter (although could you update the PR description with #24226 (comment) ?)

@codeboten codeboten merged commit b511517 into open-telemetry:main Jul 13, 2023
@github-actions github-actions bot added this to the next release milestone Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/mdatagen mdatagen command
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants