Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Claire McGinty <[email protected]>
  • Loading branch information
clairemcginty and EngHabu committed Sep 9, 2021
1 parent 1080290 commit 81abcd8
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions go/tasks/pluginmachinery/k8s/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ type UpdateResourceOperation struct {

// AbortBehavior that patches the default resource
func AbortBehaviorPatchDefaultResource(patchOperation PatchResourceOperation, deleteOnErr bool) AbortBehavior {
return AbortBehavior {
Patch: &patchOperation,
DeleteOnErr: deleteOnErr,
}
return AbortBehaviorPatch(patchOperation, deleteOnErr, nil)
}

// AbortBehavior that patches the specified resource
Expand All @@ -139,10 +136,7 @@ func AbortBehaviorPatch(patchOperation PatchResourceOperation, deleteOnErr bool,

// AbortBehavior that updates the default resource
func AbortBehaviorUpdateDefaultResource(updateOperation UpdateResourceOperation, deleteOnErr bool) AbortBehavior {
return AbortBehavior {
Update: &updateOperation,
DeleteOnErr: deleteOnErr,
}
return AbortBehaviorUpdate(updateOperation, deleteOnErr, nil)
}

// AbortBehavior that updates the specified resource
Expand All @@ -156,9 +150,7 @@ func AbortBehaviorUpdate(updateOperation UpdateResourceOperation, deleteOnErr bo

// AbortBehavior that deletes the default resource
func AbortBehaviorDeleteDefaultResource() AbortBehavior {
return AbortBehavior {
DeleteResource: true,
}
return AbortBehaviorDelete(nil)
}

// AbortBehavior that deletes the specified resource
Expand Down

0 comments on commit 81abcd8

Please sign in to comment.