mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-23 22:26:27 +00:00
chore(deps): bump the k8s group across 2 directories with 4 updates
Bumps the k8s group with 2 updates in the / directory: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Bumps the k8s group with 2 updates in the /test directory: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) and [k8s.io/component-base](https://github.com/kubernetes/component-base). Updates `k8s.io/api` from 0.35.6 to 0.35.7 - [Commits](https://github.com/kubernetes/api/compare/v0.35.6...v0.35.7) Updates `k8s.io/apimachinery` from 0.35.6 to 0.35.7 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.35.6...v0.35.7) Updates `k8s.io/client-go` from 0.35.6 to 0.35.7 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.35.6...v0.35.7) Updates `k8s.io/apimachinery` from 0.35.6 to 0.35.7 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.35.6...v0.35.7) Updates `k8s.io/component-base` from 0.34.9 to 0.34.10 - [Commits](https://github.com/kubernetes/component-base/compare/v0.34.9...v0.34.10) --- updated-dependencies: - dependency-name: k8s.io/api dependency-version: 0.35.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s - dependency-name: k8s.io/apimachinery dependency-version: 0.35.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s - dependency-name: k8s.io/client-go dependency-version: 0.35.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s - dependency-name: k8s.io/apimachinery dependency-version: 0.35.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s - dependency-name: k8s.io/component-base dependency-version: 0.34.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
+8
-1
@@ -10,6 +10,7 @@ import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
|
||||
"google.golang.org/protobuf/encoding/protowire"
|
||||
"google.golang.org/protobuf/internal/errors"
|
||||
@@ -117,7 +118,13 @@ func (o UnmarshalOptions) UnmarshalFrom(r Reader, m proto.Message) error {
|
||||
if maxSize == 0 {
|
||||
maxSize = defaultMaxSize
|
||||
}
|
||||
if maxSize != -1 && size > uint64(maxSize) {
|
||||
if maxSize == -1 {
|
||||
// No limit specified: Just check that size fits into an integer,
|
||||
// otherwise the make([]byte, size) call below will panic.
|
||||
if size > math.MaxInt {
|
||||
return errors.Wrap(&SizeTooLargeError{Size: size, MaxSize: math.MaxInt}, "")
|
||||
}
|
||||
} else if size > uint64(maxSize) {
|
||||
return errors.Wrap(&SizeTooLargeError{Size: size, MaxSize: uint64(maxSize)}, "")
|
||||
}
|
||||
|
||||
|
||||
+12
@@ -365,6 +365,10 @@ func unmarshalInt(tok json.Token, bitSize int) (protoreflect.Value, bool) {
|
||||
if err != nil {
|
||||
return protoreflect.Value{}, false
|
||||
}
|
||||
// Ensure there is no non-number content in this string.
|
||||
if next, err := dec.Read(); err != nil || next.Kind() != json.EOF {
|
||||
return protoreflect.Value{}, false
|
||||
}
|
||||
return getInt(tok, bitSize)
|
||||
}
|
||||
return protoreflect.Value{}, false
|
||||
@@ -397,6 +401,10 @@ func unmarshalUint(tok json.Token, bitSize int) (protoreflect.Value, bool) {
|
||||
if err != nil {
|
||||
return protoreflect.Value{}, false
|
||||
}
|
||||
// Ensure there is no non-number content in this string.
|
||||
if next, err := dec.Read(); err != nil || next.Kind() != json.EOF {
|
||||
return protoreflect.Value{}, false
|
||||
}
|
||||
return getUint(tok, bitSize)
|
||||
}
|
||||
return protoreflect.Value{}, false
|
||||
@@ -447,6 +455,10 @@ func unmarshalFloat(tok json.Token, bitSize int) (protoreflect.Value, bool) {
|
||||
if err != nil {
|
||||
return protoreflect.Value{}, false
|
||||
}
|
||||
// Ensure there is no non-number content in this string.
|
||||
if next, err := dec.Read(); err != nil || next.Kind() != json.EOF {
|
||||
return protoreflect.Value{}, false
|
||||
}
|
||||
return getFloat(tok, bitSize)
|
||||
}
|
||||
return protoreflect.Value{}, false
|
||||
|
||||
+4
-1
@@ -52,7 +52,10 @@ func wellKnownTypeMarshaler(name protoreflect.FullName) marshalFunc {
|
||||
case genid.FieldMask_message_name:
|
||||
return encoder.marshalFieldMask
|
||||
case genid.Empty_message_name:
|
||||
return encoder.marshalEmpty
|
||||
// The spec explicitly specifies that the Empty message
|
||||
// is not considered to have any special JSON mapping:
|
||||
// https://protobuf.dev/programming-guides/json/#any
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
+18
@@ -8,6 +8,7 @@ import (
|
||||
"fmt"
|
||||
"unicode/utf8"
|
||||
|
||||
"google.golang.org/protobuf/encoding/protowire"
|
||||
"google.golang.org/protobuf/internal/encoding/messageset"
|
||||
"google.golang.org/protobuf/internal/encoding/text"
|
||||
"google.golang.org/protobuf/internal/errors"
|
||||
@@ -49,12 +50,19 @@ type UnmarshalOptions struct {
|
||||
protoregistry.MessageTypeResolver
|
||||
protoregistry.ExtensionTypeResolver
|
||||
}
|
||||
|
||||
// RecursionLimit limits how deeply messages may be nested.
|
||||
// If zero, a default limit is applied.
|
||||
RecursionLimit int
|
||||
}
|
||||
|
||||
// Unmarshal reads the given []byte and populates the given [proto.Message]
|
||||
// using options in the UnmarshalOptions object.
|
||||
// The provided message must be mutable (e.g., a non-nil pointer to a message).
|
||||
func (o UnmarshalOptions) Unmarshal(b []byte, m proto.Message) error {
|
||||
if o.RecursionLimit == 0 {
|
||||
o.RecursionLimit = protowire.DefaultRecursionLimit
|
||||
}
|
||||
return o.unmarshal(b, m)
|
||||
}
|
||||
|
||||
@@ -102,8 +110,14 @@ func (d decoder) syntaxError(pos int, f string, x ...any) error {
|
||||
return errors.New(head+f, x...)
|
||||
}
|
||||
|
||||
var errRecursionDepth = errors.New("exceeded maximum recursion depth")
|
||||
|
||||
// unmarshalMessage unmarshals into the given protoreflect.Message.
|
||||
func (d decoder) unmarshalMessage(m protoreflect.Message, checkDelims bool) error {
|
||||
if d.opts.RecursionLimit--; d.opts.RecursionLimit < 0 {
|
||||
return errRecursionDepth
|
||||
}
|
||||
|
||||
messageDesc := m.Descriptor()
|
||||
if !flags.ProtoLegacy && messageset.IsMessageSet(messageDesc) {
|
||||
return errors.New("no support for proto1 MessageSets")
|
||||
@@ -437,6 +451,10 @@ func (d decoder) unmarshalList(fd protoreflect.FieldDescriptor, list protoreflec
|
||||
// unmarshalMap unmarshals into given protoreflect.Map. A map value is a
|
||||
// textproto message containing {key: <kvalue>, value: <mvalue>}.
|
||||
func (d decoder) unmarshalMap(fd protoreflect.FieldDescriptor, mmap protoreflect.Map) error {
|
||||
if d.opts.RecursionLimit--; d.opts.RecursionLimit < 0 {
|
||||
return errRecursionDepth
|
||||
}
|
||||
|
||||
// Determine ahead whether map entry is a scalar type or a message type in
|
||||
// order to call the appropriate unmarshalMapValue func inside
|
||||
// unmarshalMapEntry.
|
||||
|
||||
+135
-140
@@ -83,12 +83,13 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string {
|
||||
case protoreflect.FileImports:
|
||||
for i := 0; i < vs.Len(); i++ {
|
||||
var rs records
|
||||
rv := reflect.ValueOf(vs.Get(i))
|
||||
rs.Append(rv, []methodAndName{
|
||||
{rv.MethodByName("Path"), "Path"},
|
||||
{rv.MethodByName("Package"), "Package"},
|
||||
{rv.MethodByName("IsPublic"), "IsPublic"},
|
||||
{rv.MethodByName("IsWeak"), "IsWeak"},
|
||||
fi := vs.Get(i)
|
||||
rv := reflect.ValueOf(fi)
|
||||
rs.Append(rv, []attrAndName{
|
||||
{fi.Path(), "Path"},
|
||||
{fi.Package(), "Package"},
|
||||
{fi.IsPublic, "IsPublic"},
|
||||
{fi.IsWeak, "IsWeak"},
|
||||
}...)
|
||||
ss = append(ss, "{"+rs.Join()+"}")
|
||||
}
|
||||
@@ -104,9 +105,9 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string {
|
||||
}
|
||||
}
|
||||
|
||||
type methodAndName struct {
|
||||
method reflect.Value
|
||||
name string
|
||||
type attrAndName struct {
|
||||
attr any
|
||||
name string
|
||||
}
|
||||
|
||||
func FormatDesc(s fmt.State, r rune, t protoreflect.Descriptor) {
|
||||
@@ -126,58 +127,58 @@ func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool, record fu
|
||||
start = rt.Name() + "{"
|
||||
}
|
||||
|
||||
_, isFile := t.(protoreflect.FileDescriptor)
|
||||
fd, isFile := t.(protoreflect.FileDescriptor)
|
||||
rs := records{
|
||||
allowMulti: allowMulti,
|
||||
record: record,
|
||||
}
|
||||
if t.IsPlaceholder() {
|
||||
if isFile {
|
||||
rs.Append(rv, []methodAndName{
|
||||
{rv.MethodByName("Path"), "Path"},
|
||||
{rv.MethodByName("Package"), "Package"},
|
||||
{rv.MethodByName("IsPlaceholder"), "IsPlaceholder"},
|
||||
rs.Append(rv, []attrAndName{
|
||||
{fd.Path(), "Path"},
|
||||
{fd.Package(), "Package"},
|
||||
{fd.IsPlaceholder(), "IsPlaceholder"},
|
||||
}...)
|
||||
} else {
|
||||
rs.Append(rv, []methodAndName{
|
||||
{rv.MethodByName("FullName"), "FullName"},
|
||||
{rv.MethodByName("IsPlaceholder"), "IsPlaceholder"},
|
||||
rs.Append(rv, []attrAndName{
|
||||
{t.FullName(), "FullName"},
|
||||
{t.IsPlaceholder(), "IsPlaceholder"},
|
||||
}...)
|
||||
}
|
||||
} else {
|
||||
switch {
|
||||
case isFile:
|
||||
rs.Append(rv, methodAndName{rv.MethodByName("Syntax"), "Syntax"})
|
||||
rs.Append(rv, attrAndName{fd.Syntax(), "Syntax"})
|
||||
case isRoot:
|
||||
rs.Append(rv, []methodAndName{
|
||||
{rv.MethodByName("Syntax"), "Syntax"},
|
||||
{rv.MethodByName("FullName"), "FullName"},
|
||||
rs.Append(rv, []attrAndName{
|
||||
{t.Syntax(), "Syntax"},
|
||||
{t.FullName(), "FullName"},
|
||||
}...)
|
||||
default:
|
||||
rs.Append(rv, methodAndName{rv.MethodByName("Name"), "Name"})
|
||||
rs.Append(rv, attrAndName{t.Name(), "Name"})
|
||||
}
|
||||
switch t := t.(type) {
|
||||
case protoreflect.FieldDescriptor:
|
||||
accessors := []methodAndName{
|
||||
{rv.MethodByName("Number"), "Number"},
|
||||
{rv.MethodByName("Cardinality"), "Cardinality"},
|
||||
{rv.MethodByName("Kind"), "Kind"},
|
||||
{rv.MethodByName("HasJSONName"), "HasJSONName"},
|
||||
{rv.MethodByName("JSONName"), "JSONName"},
|
||||
{rv.MethodByName("HasPresence"), "HasPresence"},
|
||||
{rv.MethodByName("IsExtension"), "IsExtension"},
|
||||
{rv.MethodByName("IsPacked"), "IsPacked"},
|
||||
{rv.MethodByName("IsWeak"), "IsWeak"},
|
||||
{rv.MethodByName("IsList"), "IsList"},
|
||||
{rv.MethodByName("IsMap"), "IsMap"},
|
||||
{rv.MethodByName("MapKey"), "MapKey"},
|
||||
{rv.MethodByName("MapValue"), "MapValue"},
|
||||
{rv.MethodByName("HasDefault"), "HasDefault"},
|
||||
{rv.MethodByName("Default"), "Default"},
|
||||
{rv.MethodByName("ContainingOneof"), "ContainingOneof"},
|
||||
{rv.MethodByName("ContainingMessage"), "ContainingMessage"},
|
||||
{rv.MethodByName("Message"), "Message"},
|
||||
{rv.MethodByName("Enum"), "Enum"},
|
||||
accessors := []attrAndName{
|
||||
{t.Number(), "Number"},
|
||||
{t.Cardinality(), "Cardinality"},
|
||||
{t.Kind(), "Kind"},
|
||||
{t.HasJSONName(), "HasJSONName"},
|
||||
{t.JSONName(), "JSONName"},
|
||||
{t.HasPresence(), "HasPresence"},
|
||||
{t.IsExtension(), "IsExtension"},
|
||||
{t.IsPacked(), "IsPacked"},
|
||||
{t.IsWeak(), "IsWeak"},
|
||||
{t.IsList(), "IsList"},
|
||||
{t.IsMap(), "IsMap"},
|
||||
{t.MapKey(), "MapKey"},
|
||||
{t.MapValue(), "MapValue"},
|
||||
{t.HasDefault(), "HasDefault"},
|
||||
{t.Default(), "Default"},
|
||||
{t.ContainingOneof(), "ContainingOneof"},
|
||||
{t.ContainingMessage(), "ContainingMessage"},
|
||||
{t.Message(), "Message"},
|
||||
{t.Enum(), "Enum"},
|
||||
}
|
||||
for _, s := range accessors {
|
||||
switch s.name {
|
||||
@@ -223,58 +224,54 @@ func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool, record fu
|
||||
}
|
||||
|
||||
case protoreflect.FileDescriptor:
|
||||
rs.Append(rv, []methodAndName{
|
||||
{rv.MethodByName("Path"), "Path"},
|
||||
{rv.MethodByName("Package"), "Package"},
|
||||
{rv.MethodByName("Imports"), "Imports"},
|
||||
{rv.MethodByName("Messages"), "Messages"},
|
||||
{rv.MethodByName("Enums"), "Enums"},
|
||||
{rv.MethodByName("Extensions"), "Extensions"},
|
||||
{rv.MethodByName("Services"), "Services"},
|
||||
rs.Append(rv, []attrAndName{
|
||||
{t.Path(), "Path"},
|
||||
{t.Package(), "Package"},
|
||||
{t.Imports(), "Imports"},
|
||||
{t.Messages(), "Messages"},
|
||||
{t.Enums(), "Enums"},
|
||||
{t.Extensions(), "Extensions"},
|
||||
{t.Services(), "Services"},
|
||||
}...)
|
||||
|
||||
case protoreflect.MessageDescriptor:
|
||||
rs.Append(rv, []methodAndName{
|
||||
{rv.MethodByName("IsMapEntry"), "IsMapEntry"},
|
||||
{rv.MethodByName("Fields"), "Fields"},
|
||||
{rv.MethodByName("Oneofs"), "Oneofs"},
|
||||
{rv.MethodByName("ReservedNames"), "ReservedNames"},
|
||||
{rv.MethodByName("ReservedRanges"), "ReservedRanges"},
|
||||
{rv.MethodByName("RequiredNumbers"), "RequiredNumbers"},
|
||||
{rv.MethodByName("ExtensionRanges"), "ExtensionRanges"},
|
||||
{rv.MethodByName("Messages"), "Messages"},
|
||||
{rv.MethodByName("Enums"), "Enums"},
|
||||
{rv.MethodByName("Extensions"), "Extensions"},
|
||||
rs.Append(rv, []attrAndName{
|
||||
{t.IsMapEntry(), "IsMapEntry"},
|
||||
{t.Fields(), "Fields"},
|
||||
{t.Oneofs(), "Oneofs"},
|
||||
{t.ReservedNames(), "ReservedNames"},
|
||||
{t.ReservedRanges(), "ReservedRanges"},
|
||||
{t.RequiredNumbers(), "RequiredNumbers"},
|
||||
{t.ExtensionRanges(), "ExtensionRanges"},
|
||||
{t.Messages(), "Messages"},
|
||||
{t.Enums(), "Enums"},
|
||||
{t.Extensions(), "Extensions"},
|
||||
}...)
|
||||
|
||||
case protoreflect.EnumDescriptor:
|
||||
rs.Append(rv, []methodAndName{
|
||||
{rv.MethodByName("Values"), "Values"},
|
||||
{rv.MethodByName("ReservedNames"), "ReservedNames"},
|
||||
{rv.MethodByName("ReservedRanges"), "ReservedRanges"},
|
||||
{rv.MethodByName("IsClosed"), "IsClosed"},
|
||||
rs.Append(rv, []attrAndName{
|
||||
{t.Values(), "Values"},
|
||||
{t.ReservedNames(), "ReservedNames"},
|
||||
{t.ReservedRanges(), "ReservedRanges"},
|
||||
{t.IsClosed(), "IsClosed"},
|
||||
}...)
|
||||
|
||||
case protoreflect.EnumValueDescriptor:
|
||||
rs.Append(rv, []methodAndName{
|
||||
{rv.MethodByName("Number"), "Number"},
|
||||
}...)
|
||||
rs.Append(rv, attrAndName{t.Number(), "Number"})
|
||||
|
||||
case protoreflect.ServiceDescriptor:
|
||||
rs.Append(rv, []methodAndName{
|
||||
{rv.MethodByName("Methods"), "Methods"},
|
||||
}...)
|
||||
rs.Append(rv, attrAndName{t.Methods(), "Methods"})
|
||||
|
||||
case protoreflect.MethodDescriptor:
|
||||
rs.Append(rv, []methodAndName{
|
||||
{rv.MethodByName("Input"), "Input"},
|
||||
{rv.MethodByName("Output"), "Output"},
|
||||
{rv.MethodByName("IsStreamingClient"), "IsStreamingClient"},
|
||||
{rv.MethodByName("IsStreamingServer"), "IsStreamingServer"},
|
||||
rs.Append(rv, []attrAndName{
|
||||
{t.Input(), "Input"},
|
||||
{t.Output(), "Output"},
|
||||
{t.IsStreamingClient(), "IsStreamingClient"},
|
||||
{t.IsStreamingServer(), "IsStreamingServer"},
|
||||
}...)
|
||||
}
|
||||
if m := rv.MethodByName("GoType"); m.IsValid() {
|
||||
rs.Append(rv, methodAndName{m, "GoType"})
|
||||
if m, ok := t.(interface{ GoType() reflect.Type }); ok {
|
||||
rs.Append(rv, attrAndName{m.GoType(), "GoType"})
|
||||
}
|
||||
}
|
||||
return start + rs.Join() + end
|
||||
@@ -297,70 +294,68 @@ func (rs *records) AppendRecs(fieldName string, newRecs [2]string) {
|
||||
rs.recs = append(rs.recs, newRecs)
|
||||
}
|
||||
|
||||
func (rs *records) Append(v reflect.Value, accessors ...methodAndName) {
|
||||
for _, a := range accessors {
|
||||
if rs.record != nil {
|
||||
rs.record(a.name)
|
||||
}
|
||||
var rv reflect.Value
|
||||
if a.method.IsValid() {
|
||||
rv = a.method.Call(nil)[0]
|
||||
}
|
||||
if v.Kind() == reflect.Struct && !rv.IsValid() {
|
||||
rv = v.FieldByName(a.name)
|
||||
}
|
||||
if !rv.IsValid() {
|
||||
panic(fmt.Sprintf("unknown accessor: %v.%s", v.Type(), a.name))
|
||||
}
|
||||
if _, ok := rv.Interface().(protoreflect.Value); ok {
|
||||
rv = rv.MethodByName("Interface").Call(nil)[0]
|
||||
if !rv.IsNil() {
|
||||
rv = rv.Elem()
|
||||
}
|
||||
}
|
||||
|
||||
// Ignore zero values.
|
||||
var isZero bool
|
||||
switch rv.Kind() {
|
||||
case reflect.Interface, reflect.Slice:
|
||||
isZero = rv.IsNil()
|
||||
case reflect.Bool:
|
||||
isZero = rv.Bool() == false
|
||||
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
|
||||
isZero = rv.Int() == 0
|
||||
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
|
||||
isZero = rv.Uint() == 0
|
||||
case reflect.String:
|
||||
isZero = rv.String() == ""
|
||||
}
|
||||
if n, ok := rv.Interface().(list); ok {
|
||||
isZero = n.Len() == 0
|
||||
}
|
||||
if isZero {
|
||||
continue
|
||||
}
|
||||
|
||||
// Format the value.
|
||||
var s string
|
||||
v := rv.Interface()
|
||||
switch v := v.(type) {
|
||||
case list:
|
||||
s = formatListOpt(v, false, rs.allowMulti)
|
||||
case protoreflect.FieldDescriptor, protoreflect.OneofDescriptor, protoreflect.EnumValueDescriptor, protoreflect.MethodDescriptor:
|
||||
s = string(v.(protoreflect.Descriptor).Name())
|
||||
case protoreflect.Descriptor:
|
||||
s = string(v.FullName())
|
||||
case string:
|
||||
s = strconv.Quote(v)
|
||||
case []byte:
|
||||
s = fmt.Sprintf("%q", v)
|
||||
default:
|
||||
s = fmt.Sprint(v)
|
||||
}
|
||||
rs.recs = append(rs.recs, [2]string{a.name, s})
|
||||
func (rs *records) Append(v reflect.Value, results ...attrAndName) {
|
||||
for _, r := range results {
|
||||
rs.appendAttribute(v, r.name, r.attr)
|
||||
}
|
||||
}
|
||||
|
||||
func (rs *records) appendAttribute(val reflect.Value, name string, attrVal any) {
|
||||
if rs.record != nil {
|
||||
rs.record(name)
|
||||
}
|
||||
if attrVal == nil {
|
||||
return
|
||||
}
|
||||
rv := reflect.ValueOf(attrVal)
|
||||
if _, ok := rv.Interface().(protoreflect.Value); ok {
|
||||
rv = rv.MethodByName("Interface").Call(nil)[0]
|
||||
if !rv.IsNil() {
|
||||
rv = rv.Elem()
|
||||
}
|
||||
}
|
||||
|
||||
// Ignore zero values.
|
||||
var isZero bool
|
||||
switch rv.Kind() {
|
||||
case reflect.Interface, reflect.Slice:
|
||||
isZero = rv.IsNil()
|
||||
case reflect.Bool:
|
||||
isZero = rv.Bool() == false
|
||||
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
|
||||
isZero = rv.Int() == 0
|
||||
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
|
||||
isZero = rv.Uint() == 0
|
||||
case reflect.String:
|
||||
isZero = rv.String() == ""
|
||||
}
|
||||
if n, ok := rv.Interface().(list); ok {
|
||||
isZero = n.Len() == 0
|
||||
}
|
||||
if isZero {
|
||||
return
|
||||
}
|
||||
|
||||
// Format the value.
|
||||
var s string
|
||||
v := rv.Interface()
|
||||
switch v := v.(type) {
|
||||
case list:
|
||||
s = formatListOpt(v, false, rs.allowMulti)
|
||||
case protoreflect.FieldDescriptor, protoreflect.OneofDescriptor, protoreflect.EnumValueDescriptor, protoreflect.MethodDescriptor:
|
||||
s = string(v.(protoreflect.Descriptor).Name())
|
||||
case protoreflect.Descriptor:
|
||||
s = string(v.FullName())
|
||||
case string:
|
||||
s = strconv.Quote(v)
|
||||
case []byte:
|
||||
s = fmt.Sprintf("%q", v)
|
||||
default:
|
||||
s = fmt.Sprint(v)
|
||||
}
|
||||
rs.recs = append(rs.recs, [2]string{name, s})
|
||||
}
|
||||
|
||||
func (rs *records) Join() string {
|
||||
var ss []string
|
||||
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ const (
|
||||
Major = 1
|
||||
Minor = 36
|
||||
Patch = 11
|
||||
PreRelease = ""
|
||||
PreRelease = "devel"
|
||||
)
|
||||
|
||||
// String formats the version string for this module in semver format.
|
||||
|
||||
Vendored
+4
-4
@@ -609,7 +609,7 @@ google.golang.org/grpc/serviceconfig
|
||||
google.golang.org/grpc/stats
|
||||
google.golang.org/grpc/status
|
||||
google.golang.org/grpc/tap
|
||||
# google.golang.org/protobuf v1.36.11
|
||||
# google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
|
||||
## explicit; go 1.23
|
||||
google.golang.org/protobuf/encoding/protodelim
|
||||
google.golang.org/protobuf/encoding/protojson
|
||||
@@ -668,7 +668,7 @@ gopkg.in/yaml.v2
|
||||
# gopkg.in/yaml.v3 v3.0.1
|
||||
## explicit
|
||||
gopkg.in/yaml.v3
|
||||
# k8s.io/api v0.35.6
|
||||
# k8s.io/api v0.35.7
|
||||
## explicit; go 1.25.0
|
||||
k8s.io/api/admissionregistration/v1
|
||||
k8s.io/api/admissionregistration/v1alpha1
|
||||
@@ -727,7 +727,7 @@ k8s.io/api/storage/v1
|
||||
k8s.io/api/storage/v1alpha1
|
||||
k8s.io/api/storage/v1beta1
|
||||
k8s.io/api/storagemigration/v1beta1
|
||||
# k8s.io/apimachinery v0.35.6
|
||||
# k8s.io/apimachinery v0.35.7
|
||||
## explicit; go 1.25.0
|
||||
k8s.io/apimachinery/pkg/api/equality
|
||||
k8s.io/apimachinery/pkg/api/errors
|
||||
@@ -782,7 +782,7 @@ k8s.io/apimachinery/pkg/version
|
||||
k8s.io/apimachinery/pkg/watch
|
||||
k8s.io/apimachinery/third_party/forked/golang/json
|
||||
k8s.io/apimachinery/third_party/forked/golang/reflect
|
||||
# k8s.io/client-go v0.35.6
|
||||
# k8s.io/client-go v0.35.7
|
||||
## explicit; go 1.25.0
|
||||
k8s.io/client-go/applyconfigurations/admissionregistration/v1
|
||||
k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1
|
||||
|
||||
Reference in New Issue
Block a user