mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
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
This commit is contained in:
commit
fc51574bb4
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user