mirror of https://github.com/k3s-io/k3s
Clean up controller-manager.
These are based on recommendation from [staticcheck](http://staticcheck.io/).k3s-v1.15.3
parent
ebe32557bc
commit
a591a838e5
|
@ -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))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue