-
Notifications
You must be signed in to change notification settings - Fork 209
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
refactor: cleanups for k8sutils workload package. create enums and move common functions #1449
Conversation
return err | ||
} | ||
|
||
func WorkloadKindLowerCaseFromKind(pascalCase WorkloadKind) WorkloadKindLowerCase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is equivalent to strings.ToLower
. I'm not sure why we need types for both pascal and lowercase. We can have just the pascal one and use ToLower
when needed in the utils functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, since it's used in several places, I choose to have a type for it as enum
This is another step in the way to move everything related to common things into the common packages, and avoid duplications and untyped usages in the project.
This PR:
workload
package in k8sutils to differentiate between the different utils and enumsThere are countless places to go over and improve. This PR is touching on the most easy and straight forward cases I spotted.