Skip to content

Commit a591a83

Browse files
committed
Clean up controller-manager.
These are based on recommendation from [staticcheck](http://staticcheck.io/).
1 parent ebe3255 commit a591a83

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cmd/controller-manager/app/options/generic.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ func (o *GenericControllerManagerConfigurationOptions) Validate(allControllers [
103103
if controller == "*" {
104104
continue
105105
}
106-
if strings.HasPrefix(controller, "-") {
107-
controller = controller[1:]
108-
}
106+
controller = strings.TrimPrefix(controller, "-")
109107
if !allControllersSet.Has(controller) {
110108
errs = append(errs, fmt.Errorf("%q is not in the list of known controllers", controller))
111109
}

0 commit comments

Comments
 (0)