- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for NumField (0.13 sec)
-
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/validation_test.go
} } // check that anything other than name and generateName of ObjectMeta in metadata properties is forbidden tt := reflect.TypeOf(metav1.ObjectMeta{}) for i := 0; i < tt.NumField(); i++ { property := tt.Field(i).Name s := &Structural{ Generic: Generic{ Type: "object", }, Properties: map[string]Structural{ property: {}, }, }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 31 18:20:00 UTC 2024 - 11.6K bytes - Viewed (0) -
src/encoding/gob/debug.go
// Field number 0 is CommonType deb.delta(1) com := deb.common() // Field number 1 is slice of FieldType deb.delta(1) numField := int(deb.uint()) field := make([]*fieldType, numField) for i := 0; i < numField; i++ { field[i] = new(fieldType) deb.delta(1) // field 0 of fieldType: name field[i].Name = deb.string() deb.delta(1) // field 1 of fieldType: id
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 20 09:34:41 UTC 2023 - 18.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go
case reflect.Ptr: return e.deepValueEqual(v1.Elem(), v2.Elem(), visited, equateNilAndEmpty, depth+1) case reflect.Struct: for i, n := 0, v1.NumField(); i < n; i++ { if !e.deepValueEqual(v1.Field(i), v2.Field(i), visited, equateNilAndEmpty, depth+1) { return false } } return true case reflect.Map: if equateNilAndEmpty {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 20 17:18:42 UTC 2022 - 10.8K bytes - Viewed (0) -
src/encoding/gob/encode.go
for fieldNum, wireFieldNum := 0, 0; fieldNum < srt.NumField(); fieldNum++ { f := srt.Field(fieldNum) if !isSent(&f) { continue } op, indir := encOpFor(f.Type, seen, building) engine.instr = append(engine.instr, encInstr{*op, wireFieldNum, f.Index, indir}) wireFieldNum++ } if srt.NumField() > 0 && len(engine.instr) == 0 { errorf("type %s has no exported fields", rt)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 02:00:26 UTC 2024 - 19K bytes - Viewed (0) -
src/cmd/vendor/rsc.io/markdown/parse.go
fmt.Fprintf(buf, "(%T", b) v := reflect.ValueOf(b) v = reflect.Indirect(v) if v.Kind() != reflect.Struct { fmt.Fprintf(buf, " %v", b) } t := v.Type() for i := 0; i < t.NumField(); i++ { tf := t.Field(i) if !tf.IsExported() { continue } if tf.Type == inlinesType { printis(buf, v.Field(i).Interface().([]Inline))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 13:01:26 UTC 2024 - 13.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/converter.go
dv.Set(reflect.MakeMapWithSize(mapStringInterfaceType, st.NumField())) dv = dv.Elem() dt = dv.Type() } if dt.Kind() != reflect.Map { return fmt.Errorf("cannot convert struct to: %v", dt.Kind()) } realMap := dv.Interface().(map[string]interface{}) for i := 0; i < st.NumField(); i++ { fieldInfo := fieldInfoFromField(st, i) fv := sv.Field(i)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 11 16:02:13 UTC 2023 - 24.9K bytes - Viewed (0) -
src/encoding/binary/binary.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 17:29:31 UTC 2024 - 23.4K bytes - Viewed (0) -
test/escape_reflect.go
v := reflect.ValueOf(x) // ERROR "x does not escape" return v.Field(2).String() } func numfield(x S) int { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return v.NumField() } func index1(x []int) int { // ERROR "x does not escape" v := reflect.ValueOf(x) // ERROR "x does not escape" return int(v.Index(0).Int()) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 18:50:24 UTC 2023 - 13.1K bytes - Viewed (0) -
pkg/kubelet/apis/config/helpers_test.go
} paths := sets.New[string]() switch tp.Kind() { case reflect.Pointer: paths.Insert(sets.List(allPrimitiveFieldPaths(t, skipRecurseList, tp.Elem(), path))...) case reflect.Struct: for i := 0; i < tp.NumField(); i++ { field := tp.Field(i) paths.Insert(sets.List(allPrimitiveFieldPaths(t, skipRecurseList, field.Type, path.Child(field.Name)))...) } case reflect.Map, reflect.Slice:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 06:25:43 UTC 2024 - 10.2K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion_test.go
if a == b { return } if a.Kind() != b.Kind() { fatalTypeError(t, path, a, b, "mismatched Kind") } switch a.Kind() { case reflect.Struct: aFields := a.NumField() bFields := b.NumField() if aFields != bFields { fatalTypeError(t, path, a, b, "mismatched field count") } for i := 0; i < aFields; i++ { aField := a.Field(i) bField := b.Field(i)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 28 19:06:46 UTC 2024 - 29.2K bytes - Viewed (0)