Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 94 for NumField (0.36 sec)

  1. src/reflect/type.go

    	Key() Type
    
    	// Len returns an array type's length.
    	// It panics if the type's Kind is not Array.
    	Len() int
    
    	// NumField returns a struct type's field count.
    	// It panics if the type's Kind is not Struct.
    	NumField() int
    
    	// NumIn returns a function type's input parameter count.
    	// It panics if the type's Kind is not Func.
    	NumIn() int
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  2. src/runtime/malloc_test.go

    		"NumGC": {nz, le(1e9)}, "NumForcedGC": {nz, le(1e9)},
    		"GCCPUFraction": {le(0.99)}, "EnableGC": {eq(true)}, "DebugGC": {eq(false)},
    		"BySize": nil,
    	}
    
    	rst := reflect.ValueOf(st).Elem()
    	for i := 0; i < rst.Type().NumField(); i++ {
    		name, val := rst.Type().Field(i).Name, rst.Field(i).Interface()
    		checks, ok := fields[name]
    		if !ok {
    			t.Errorf("unknown MemStats field %s", name)
    			continue
    		}
    		for _, check := range checks {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  3. pkg/util/iptables/testing/parse.go

    // returns a pointer to the Value of that field, and the value of its "negatable" tag.
    func findParamField(value reflect.Value, param string) (*reflect.Value, bool) {
    	typ := value.Type()
    	for i := 0; i < typ.NumField(); i++ {
    		field := typ.Field(i)
    		if field.Tag.Get("param") == param {
    			fValue := value.Field(i)
    			return &fValue, field.Tag.Get("negatable") == "true"
    		}
    	}
    	return nil, false
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  4. operator/pkg/apis/istio/v1alpha1/validation/validation.go

    		}
    	}
    	// If it is not a struct nothing to do, returning previously collected validation errors
    	if e.Kind() != reflect.Struct {
    		return validationErrors
    	}
    	for i := 0; i < e.NumField(); i++ {
    		// Corner case of a slice of something, if something is defined type, then process it recursively.
    		if e.Field(i).Kind() == reflect.Slice {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 16 20:02:28 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  5. schema/field.go

    					for i := 0; i < rvType.NumField(); i++ {
    						for key, value := range ParseTagSetting(rvType.Field(i).Tag.Get("gorm"), ";") {
    							if _, ok := field.TagSettings[key]; !ok {
    								field.TagSettings[key] = value
    							}
    						}
    					}
    
    					for i := 0; i < rvType.NumField(); i++ {
    						newFieldType := rvType.Field(i).Type
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ir/fmt.go

    		fmt.Fprintf(w, " %+v", n.Sym())
    	}
    
    	// Print Node-specific fields of basic type in header line.
    	v := reflect.ValueOf(n).Elem()
    	t := v.Type()
    	nf := t.NumField()
    	for i := 0; i < nf; i++ {
    		tf := t.Field(i)
    		if tf.PkgPath != "" {
    			// skip unexported field - Interface will fail
    			continue
    		}
    		k := tf.Type.Kind()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/third_party/forked/golang/json/fields.go

    		for _, f := range current {
    			if visited[f.typ] {
    				continue
    			}
    			visited[f.typ] = true
    
    			// Scan f.typ for fields to include.
    			for i := 0; i < f.typ.NumField(); i++ {
    				sf := f.typ.Field(i)
    				if sf.PkgPath != "" { // unexported
    					continue
    				}
    				tag := sf.Tag.Get("json")
    				if tag == "-" {
    					continue
    				}
    				name, opts := parseTag(tag)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 13.1K bytes
    - Viewed (0)
  8. pkg/apis/core/fuzzer/fuzzer.go

    				*k.Mode &= 0777
    			}
    		},
    		func(vs *core.VolumeSource, c fuzz.Continue) {
    			// Exactly one of the fields must be set.
    			v := reflect.ValueOf(vs).Elem()
    			i := int(c.RandUint64() % uint64(v.NumField()))
    			t := v.Field(i).Addr()
    			for v.Field(i).IsNil() {
    				c.Fuzz(t.Interface())
    			}
    		},
    		func(i *core.ISCSIVolumeSource, c fuzz.Continue) {
    			i.ISCSIInterface = c.RandString()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 04:32:01 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  9. src/runtime/gc_test.go

    			return
    		}
    		for i := 0; i < got.Len(); i++ {
    			logDiff(t, fmt.Sprintf("%s[%d]", prefix, i), got.Index(i), want.Index(i))
    		}
    	case reflect.Struct:
    		for i := 0; i < typ.NumField(); i++ {
    			gf, wf := got.Field(i), want.Field(i)
    			logDiff(t, prefix+"."+typ.Field(i).Name, gf, wf)
    		}
    	case reflect.Map:
    		t.Fatal("not implemented: logDiff for map")
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  10. pkg/scheduler/eventhandlers_test.go

    			}
    		})
    	}
    }
    
    func TestNodeConditionsChanged(t *testing.T) {
    	nodeConditionType := reflect.TypeOf(v1.NodeCondition{})
    	if nodeConditionType.NumField() != 6 {
    		t.Errorf("NodeCondition type has changed. The nodeConditionsChanged() function must be reevaluated.")
    	}
    
    	for _, test := range []struct {
    		Name          string
    		Changed       bool
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 10 14:38:54 UTC 2024
    - 21.5K bytes
    - Viewed (0)
Back to top