Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for NumField (0.34 sec)

  1. tests/migrate_test.go

    	}
    	typ := reflect.Indirect(reflect.ValueOf(&UserMigrateColumn2{})).Type()
    	numField := typ.NumField()
    	if numField != len(columnTypes) {
    		t.Fatalf("column's number not match struct and ddl, %d != %d", numField, len(columnTypes))
    	}
    	namer := schema.NamingStrategy{}
    	for i := 0; i < numField; i++ {
    		expectName := namer.ColumnName("", typ.Field(i).Name)
    		if columnTypes[i].Name() != expectName {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Mar 18 11:24:16 UTC 2024
    - 56.2K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. staging/src/k8s.io/apiserver/pkg/endpoints/installer.go

    	if err != nil {
    		return err
    	}
    	st := sv.Type()
    	excludedNameSet := sets.NewString(excludedNames...)
    	switch st.Kind() {
    	case reflect.Struct:
    		for i := 0; i < st.NumField(); i++ {
    			name := st.Field(i).Name
    			sf, ok := st.FieldByName(name)
    			if !ok {
    				continue
    			}
    			switch sf.Type.Kind() {
    			case reflect.Interface, reflect.Struct:
    			case reflect.Pointer:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 18:15:22 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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