Commit 7d59b2d3 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents c42c34da c12e6dbb
......@@ -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)
}
......
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