- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 94 for NumField (0.15 sec)
-
src/fmt/print.go
p.buf.writeByte('}') } else { p.buf.writeByte(']') } case reflect.Struct: if p.fmt.sharpV { p.buf.writeString(f.Type().String()) } p.buf.writeByte('{') for i := 0; i < f.NumField(); i++ { if i > 0 { if p.fmt.sharpV { p.buf.writeString(commaSpaceString) } else { p.buf.writeByte(' ') } } if p.fmt.plusV || p.fmt.sharpV {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:22:43 UTC 2024 - 31.8K bytes - Viewed (0) -
src/encoding/gob/decode.go
return } value = decAlloc(value) engine := *enginePtr if st := base; st.Kind() == reflect.Struct && ut.externalDec == 0 { wt := dec.wireType[wireId] if engine.numInstr == 0 && st.NumField() > 0 && wt != nil && len(wt.StructT.Field) > 0 { name := base.Name() errorf("type mismatch: no fields matched compiling decoder for %s", name) } dec.decodeStruct(engine, value) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 07 19:10:23 UTC 2023 - 40.1K bytes - Viewed (0) -
src/reflect/all_test.go
shouldPanic("call of reflect.Value.Method on zero Value", func() { vo(nil).Method(0) }) shouldPanic("call of reflect.Value.NumField on string Value", func() { vo("").NumField() }) shouldPanic("call of reflect.Value.NumMethod on zero Value", func() { vo(nil).NumMethod() })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 218.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/installer.go
if err != nil { return err } st := sv.Type() excludedNameSet := sets.NewString(excludedNames...) switch st.Kind() { case reflect.Struct: for i := 0; i < st.NumField(); i++ { name := st.Field(i).Name sf, ok := st.FieldByName(name) if !ok { continue } switch sf.Type.Kind() { case reflect.Interface, reflect.Struct: case reflect.Pointer:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 18:15:22 UTC 2024 - 51.5K bytes - Viewed (0) -
src/crypto/tls/tls_test.go
} } func TestCloneNonFuncFields(t *testing.T) { var c1 Config v := reflect.ValueOf(&c1).Elem() typ := v.Type() for i := 0; i < typ.NumField(); i++ { f := v.Field(i) // testing/quick can't handle functions or interfaces and so // isn't used here. switch fn := typ.Field(i).Name; fn { case "Rand": f.Set(reflect.ValueOf(io.Reader(os.Stdin)))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 60.5K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go
// these fields are chosen such that, if status is extracted as properties["status"], it's validation is not lost. if statusSubresourceEnabled { v := reflect.ValueOf(schema).Elem() for i := 0; i < v.NumField(); i++ { // skip zero values if value := v.Field(i).Interface(); reflect.DeepEqual(value, reflect.Zero(reflect.TypeOf(value)).Interface()) { continue } fieldName := v.Type().Field(i).Name
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 82.6K bytes - Viewed (0) -
pkg/apis/core/v1/defaults_test.go
legacyscheme.Scheme.Default(obj) defaultedV := visit.value zeroV := reflect.Zero(visit.value.Type()) switch { case visit.value.Kind() == reflect.Struct: for fi := 0; fi < visit.value.NumField(); fi++ { structField := visit.value.Type().Field(fi) valueField := visit.value.Field(fi) if valueField.CanSet() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 84.4K bytes - Viewed (0) -
pkg/api/pod/util_test.go
// ObjectMeta is generic and therefore should never have a field with a specific resource's name; // it contains cycles so it's easiest to just skip it. if name == "ObjectMeta" { break } for i := 0; i < tp.NumField(); i++ { field := tp.Field(i) resourcePaths.Insert(sets.List[string](collectResourcePaths(t, resourcename, path.Child(field.Name), field.Name, field.Type))...) } case reflect.Interface:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 108.8K bytes - Viewed (0) -
src/net/http/transport.go
// requested. (Issue 22891) altProto, _ := t.altProto.Load().(map[string]RoundTripper) if rv := reflect.ValueOf(altProto["https"]); rv.IsValid() && rv.Type().Kind() == reflect.Struct && rv.Type().NumField() == 1 { if v := rv.Field(0); v.CanInterface() { if h2i, ok := v.Interface().(h2Transport); ok { t.h2transport = h2i return } } } if t.TLSNextProto != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 91K bytes - Viewed (0) -
src/net/http/transport_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 192.6K bytes - Viewed (0)