You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.
There are several helper structs that are thin wrappers around kubernetes primitives. These structs don't add any members and are being used to create methods that extend the original kubernetes structs. This behavior could be made simpler by removing the extra struct declarations and instead making these types.
For example, in core/deploymentconfigs/deploymentconfigs.go this:
type ODeploymentConfig struct {
api.DeploymentConfig
}
would be refactored into
type ODeploymentConfig api.DeploymentConfig
To make this change we will need to adjust how some of the methods that operate on the underlying struct work. Primarily, we should rename methods that have the same name as underlying members. These methods should change their names to reflect their status as setters.
For example, in helpers/containers/containers.go this:
There are several helper structs that are thin wrappers around kubernetes primitives. These structs don't add any members and are being used to create methods that extend the original kubernetes structs. This behavior could be made simpler by removing the extra struct declarations and instead making these types.
For example, in
core/deploymentconfigs/deploymentconfigs.go
this:would be refactored into
To make this change we will need to adjust how some of the methods that operate on the underlying struct work. Primarily, we should rename methods that have the same name as underlying members. These methods should change their names to reflect their status as setters.
For example, in
helpers/containers/containers.go
this:would be refactored into
This would make the code more explicit in its functionality and allow access to the kubernetes primitives in a cleaner manner.
migrated from radanalyticsio/oshinko-rest#65
The text was updated successfully, but these errors were encountered: