- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for NumField (0.1 sec)
-
src/reflect/value.go
return Value{} } m, ok := toRType(v.typ()).MethodByName(name) if !ok { return Value{} } return v.Method(m.Index) } // NumField returns the number of fields in the struct v. // It panics if v's Kind is not [Struct]. func (v Value) NumField() int { v.mustBe(Struct) tt := (*structType)(unsafe.Pointer(v.typ())) return len(tt.Fields) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 119.9K 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) -
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_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)