Skip to content

Commit

Permalink
refactor: honor review crossplane-contrib#23 (comment)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Schroeder <97968850+schroeder-paul@users.noreply.github.com>
  • Loading branch information
schroeder-paul committed Jan 27, 2022
1 parent fe098c5 commit 36f52bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pkg/controller/system/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,11 @@ func (e *external) updateLabels(ctx context.Context, cr *v1alpha1.System) error
}

func getDetailsOfSystemType(systemType string) (systemDetails, error) {
desiredType := strings.ToLower(systemType)
err := errors.New(errSystemNotSupported)
var details systemDetails

switch {
case strings.HasPrefix(desiredType, "kubernetes"):
case strings.HasPrefix(systemType, "kubernetes"):
details.AssetType = "helm-values"
details.ConnectionDetailsValuesKey = "helmValues"
details.errGetValuesMessage = errGetHelmValues
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/system/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ func TestGetDetailsOfSystemType(t *testing.T) {
},
"KubernetesSystem": {
args: args{
"kubERnETes:v123",
"kubernetes:v123",
},
want: want{
systemDetails{
Expand Down

0 comments on commit 36f52bf

Please sign in to comment.