Clean up controller-manager.

These are based on recommendation from [staticcheck](http://staticcheck.io/).
parent ebe32557
...@@ -103,9 +103,7 @@ func (o *GenericControllerManagerConfigurationOptions) Validate(allControllers [ ...@@ -103,9 +103,7 @@ func (o *GenericControllerManagerConfigurationOptions) Validate(allControllers [
if controller == "*" { if controller == "*" {
continue continue
} }
if strings.HasPrefix(controller, "-") { controller = strings.TrimPrefix(controller, "-")
controller = controller[1:]
}
if !allControllersSet.Has(controller) { if !allControllersSet.Has(controller) {
errs = append(errs, fmt.Errorf("%q is not in the list of known controllers", controller)) errs = append(errs, fmt.Errorf("%q is not in the list of known controllers", controller))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment