mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 13:02:14 +00:00
cleancode:util.go
This commit is contained in:
parent
82cde2182f
commit
7474a9def0
@ -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