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

Use consistent naming across resource methods #327

Merged
merged 2 commits into from Feb 24, 2022

Conversation

sebasslash
Copy link
Contributor

Description

This PR introduces a refactor for several methods that poorly express an action on a relationship between two resources. By using verbs, we can be more specific as to what action we're performing when calling these methods. An example would be
ModuleConsumers() -- from this method signature we can't necessarily tell what action this method is performing without
referring to the docs. Renaming it to ListModuleConsumers() we can now assess what the function does more conveniently.

@sebasslash sebasslash requested a review from a team as a code owner February 22, 2022 21:46
organization.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@brandonc brandonc left a comment

Choose a reason for hiding this comment

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

We need to make a note about this impactful change in order to highlight it in the release notes

agent_token.go Show resolved Hide resolved
organization.go Outdated Show resolved Hide resolved
@sebasslash sebasslash force-pushed the sebasslash/method-naming-refactor branch 2 times, most recently from e1b6658 to 23f2378 Compare February 23, 2022 20:19
This commit introduces a refactor for several methods that express an action on a relationship between two resources. By using
verbs, we can be more specific as to what action we're performing when calling these methods. An example would be
ModuleConsumers() -- from this method signature we can't necessarily tell what action this method is performing without
referring to the docs. Renaming it to ListModuleConsumers() we can now assess what the function does more conveniently.
@sebasslash sebasslash force-pushed the sebasslash/method-naming-refactor branch from 9c1070d to b8682da Compare February 24, 2022 19:37
@sebasslash sebasslash merged commit 9b2ac88 into releases-1.0.x Feb 24, 2022
@sebasslash sebasslash deleted the sebasslash/method-naming-refactor branch February 24, 2022 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants