Skip to content

Rename methods with Get prefix #582

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
May 10, 2020
Merged

Conversation

suhaibmujahid
Copy link
Contributor

It is not Go idiomatic to put Get into the getter's name (see here).

Based on the discussion with @lhchavez on Slack. He suggested the renaming and adding backward compatibility.

Copy link
Contributor

@lhchavez lhchavez left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

@suhaibmujahid
Copy link
Contributor Author

Thank you for the corrections 👍

Copy link
Contributor

@lhchavez lhchavez left a comment

Choose a reason for hiding this comment

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

since I can't squash this commit, do you mind doing that? otherwise looks good!

It is not Go idiomatic to put Get into the getter's name.

https: //golang.org/doc/effective_go.html#Getters
Co-Authored-By: lhchavez <lhchavez@users.noreply.github.com>
@suhaibmujahid
Copy link
Contributor Author

Done!

@lhchavez lhchavez merged commit 31f877e into libgit2:master May 10, 2020
@suhaibmujahid suhaibmujahid deleted the method-rename branch May 10, 2020 03:40
lhchavez added a commit that referenced this pull request Aug 15, 2020
It is not Go idiomatic to put Get into the getter's name

(cherry picked from commit 31f877e)
lhchavez added a commit that referenced this pull request Aug 15, 2020
It is not Go idiomatic to put Get into the getter's name

(cherry picked from commit 31f877e)
lhchavez added a commit that referenced this pull request Aug 15, 2020
It is not Go idiomatic to put Get into the getter's name

(cherry picked from commit 31f877e)
lhchavez added a commit that referenced this pull request Aug 15, 2020
It is not Go idiomatic to put Get into the getter's name

(cherry picked from commit 31f877e)
lhchavez added a commit that referenced this pull request Aug 16, 2020
It is not Go idiomatic to put Get into the getter's name

(cherry picked from commit 31f877e)
lhchavez added a commit that referenced this pull request Aug 16, 2020
It is not Go idiomatic to put Get into the getter's name

(cherry picked from commit 31f877e)
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