- Sort Score
- Result 10 results
- Languages All
Results 71 - 79 of 79 for NumField (0.21 sec)
-
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) -
pkg/apis/core/validation/validation.go
var allErrs field.ErrorList reflectType, reflectValue := reflect.TypeOf(value), reflect.ValueOf(value) for i := 0; i < reflectType.NumField(); i++ { f := reflectType.Field(i) if allowedFields[f.Name] { continue } // Compare the value of this field to its zero value to determine if it has been set
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 349.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"(Value).MapIndex", Method, 0}, {"(Value).MapKeys", Method, 0}, {"(Value).MapRange", Method, 12}, {"(Value).Method", Method, 0}, {"(Value).MethodByName", Method, 0}, {"(Value).NumField", Method, 0}, {"(Value).NumMethod", Method, 0}, {"(Value).OverflowComplex", Method, 0}, {"(Value).OverflowFloat", Method, 0}, {"(Value).OverflowInt", Method, 0}, {"(Value).OverflowUint", Method, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0) -
pkg/apis/core/validation/validation_test.go
paths := sets.NewString() switch tp.Kind() { case reflect.Pointer: paths.Insert(collectResourcePaths(t, skipRecurseList, tp.Elem(), path).List()...) case reflect.Struct: for i := 0; i < tp.NumField(); i++ { field := tp.Field(i) paths.Insert(collectResourcePaths(t, skipRecurseList, field.Type, path.Child(field.Name)).List()...) } case reflect.Map, reflect.Slice:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 857.7K bytes - Viewed (0)