Commit fc51574b authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #44913 from zhangxiaoyu-zidif/cleancode-util-for-err

Automatic merge from submit-queue cleancode:util.go cleancode, the modification point make code clean and light
parents 36590b06 7474a9de
......@@ -254,9 +254,9 @@ func GetVersionedClientForRBACOrFail(hostFactory cmdutil.Factory) (client.Interf
}
return hostFactory.ClientSetForVersion(&gv)
}
for i := 0; i < len(g.Versions); i++ {
if g.Versions[i].GroupVersion != "" {
gv, err := schema.ParseGroupVersion(g.Versions[i].GroupVersion)
for _, version := range g.Versions {
if version.GroupVersion != "" {
gv, err := schema.ParseGroupVersion(version.GroupVersion)
if err != nil {
return nil, err
}
......
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