Upgrade k8s package verison (#5358)

* upgrade k8s package version

Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>

* Script upgrade and code formatting.

Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>

Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>
This commit is contained in:
hongzhouzi
2022-11-15 14:56:38 +08:00
committed by GitHub
parent 5f91c1663a
commit 44167aa47a
3106 changed files with 321340 additions and 172080 deletions

11
vendor/k8s.io/gengo/namer/namer.go generated vendored
View File

@@ -17,7 +17,9 @@ limitations under the License.
package namer
import (
"fmt"
"path/filepath"
"strconv"
"strings"
"k8s.io/gengo/types"
@@ -246,6 +248,12 @@ func (ns *NameStrategy) Name(t *types.Type) string {
"Slice",
ns.removePrefixAndSuffix(ns.Name(t.Elem)),
}, ns.Suffix)
case types.Array:
name = ns.Join(ns.Prefix, []string{
"Array",
ns.removePrefixAndSuffix(fmt.Sprintf("%d", t.Len)),
ns.removePrefixAndSuffix(ns.Name(t.Elem)),
}, ns.Suffix)
case types.Pointer:
name = ns.Join(ns.Prefix, []string{
"Pointer",
@@ -340,6 +348,9 @@ func (r *rawNamer) Name(t *types.Type) string {
name = "map[" + r.Name(t.Key) + "]" + r.Name(t.Elem)
case types.Slice:
name = "[]" + r.Name(t.Elem)
case types.Array:
l := strconv.Itoa(int(t.Len))
name = "[" + l + "]" + r.Name(t.Elem)
case types.Pointer:
name = "*" + r.Name(t.Elem)
case types.Struct:

View File

@@ -22,7 +22,7 @@ import (
"k8s.io/gengo/types"
)
var consonants = "bcdfghjklmnpqrsttvwxyz"
var consonants = "bcdfghjklmnpqrstvwxyz"
type pluralNamer struct {
// key is the case-sensitive type name, value is the case-insensitive