Clean up controller-manager.

These are based on recommendation from
[staticcheck](http://staticcheck.io/).
k3s-v1.15.3
Àbéjídé Àyodélé 2019-05-01 16:23:28 +00:00
parent ebe32557bc
commit a591a838e5
1 changed files with 1 additions and 3 deletions

View File

@ -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))
} }