-
Notifications
You must be signed in to change notification settings - Fork 54
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 string constants consistently #163
Comments
Anything in |
The ones I've found are:
For the
In some cases, we define a constant but the code doesn't use it. For example "ProviderRequest" has a definition in "data.lib" and "data.inventory" aren't repeated a bunch of times, but they're so important we should have them as constants so it's clear that their repetition in both "main.go" and "client.go" is meaningful and can't accidentally be broken. That's everything I could find. There might be more (feel free to look if you want). |
Also "data" since we define it as the root object users reference, so it pops up in a bunch of locations. |
Is this a blocker for sharding? |
Moving constants to pkg/apis seems reasonable |
Mostly done as parts of various PRs. |
Strings like the following should live in their canonical locations in kubernetes packages:
This aids discoverability, makes testing easier, and ensures that differences in manually-typed strings are impossible.
The text was updated successfully, but these errors were encountered: