mirror of https://github.com/k3s-io/k3s
Merge pull request #53575 from dahefanteng/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. remove repeated type conversion **What this PR does / why we need it**: remove repeated type conversion(convert String to Feature) **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # we just need make this conversion once. **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/6/head
commit
7d59b2d338
|
@ -157,7 +157,7 @@ func (f *featureGate) Set(value string) error {
|
|||
}
|
||||
arr := strings.SplitN(s, "=", 2)
|
||||
k := Feature(strings.TrimSpace(arr[0]))
|
||||
_, ok := known[Feature(k)]
|
||||
_, ok := known[k]
|
||||
if !ok {
|
||||
return fmt.Errorf("unrecognized key: %s", k)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue