Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for NumField (0.28 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. pilot/pkg/networking/core/listener_test.go

    	// If this fails, that means new fields have been added to FilterChainMatch, filterChainMatchEqual function needs to be updated.
    	if e.NumField() != 14 {
    		t.Fatalf("Expected 14 fields, got %v. This means we need to update filterChainMatchEqual implementation", e.NumField())
    	}
    }
    
    func TestInboundListener_PrivilegedPorts(t *testing.T) {
    	// Verify that an explicit ingress listener will not bind to privileged ports
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 01:56:28 UTC 2024
    - 93.6K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
Back to top