Skip to content

Commit efcceee

Browse files
committed
reduce assignment
Signed-off-by: sivchari <[email protected]>
1 parent f42ee7a commit efcceee

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cmd/kubeadm/app/util/patches/patches.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,7 @@ func (pm *PatchManager) ApplyPatchesToTarget(patchTarget *PatchTarget) error {
171171
var err error
172172
var patchedData []byte
173173

174-
var found bool
175-
if slices.Contains(pm.knownTargets, patchTarget.Name) {
176-
found = true
177-
}
178-
if !found {
174+
if !slices.Contains(pm.knownTargets, patchTarget.Name) {
179175
return errors.Errorf("unknown patch target name %q, must be one of %v", patchTarget.Name, pm.knownTargets)
180176
}
181177

0 commit comments

Comments
 (0)