Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 2,526 for REFLECT (0.09 sec)

  1. src/internal/fmtsort/sort.go

    func compare(aVal, bVal reflect.Value) int {
    	aType, bType := aVal.Type(), bVal.Type()
    	if aType != bType {
    		return -1 // No good answer possible, but don't return 0: they're not equal.
    	}
    	switch aVal.Kind() {
    	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    		return cmp.Compare(aVal.Int(), bVal.Int())
    	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:31:45 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/testdata/deadcode/structof_funcof.go

    			Type: reflect.TypeOf(int(0)),
    		},
    	})
    	println(t.Name())
    }
    
    func useFuncOf() {
    	t := reflect.FuncOf(
    		[]reflect.Type{reflect.TypeOf(int(0))},
    		[]reflect.Type{reflect.TypeOf(int(0))},
    		false,
    	)
    	println(t.Name())
    }
    
    func main() {
    	useStructOf()
    	useFuncOf()
    
    	var t T
    	meth, _ := reflect.TypeOf(t).MethodByName("F")
    	ft := meth.Type
    	at := ft.In(1)
    	v := reflect.New(at).Elem()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:07:26 UTC 2023
    - 994 bytes
    - Viewed (0)
  3. scan.go

    					}
    				}
    			}
    		}
    
    		switch reflectValue.Kind() {
    		case reflect.Slice, reflect.Array:
    			var (
    				elem        reflect.Value
    				isArrayKind = reflectValue.Kind() == reflect.Array
    			)
    
    			if !update || reflectValue.Len() == 0 {
    				update = false
    				if isArrayKind {
    					db.Statement.ReflectValue.Set(reflect.Zero(reflectValue.Type()))
    				} else {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:57:36 UTC 2024
    - 10K bytes
    - Viewed (0)
  4. src/encoding/gob/dec_helpers.go

    	reflect.Int8:       decInt8Array,
    	reflect.String:     decStringArray,
    	reflect.Uint:       decUintArray,
    	reflect.Uint16:     decUint16Array,
    	reflect.Uint32:     decUint32Array,
    	reflect.Uint64:     decUint64Array,
    	reflect.Uintptr:    decUintptrArray,
    }
    
    var decSliceHelper = map[reflect.Kind]decHelper{
    	reflect.Bool:       decBoolSlice,
    	reflect.Complex64:  decComplex64Slice,
    	reflect.Complex128: decComplex128Slice,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 24 19:28:46 UTC 2023
    - 15.4K bytes
    - Viewed (0)
  5. test/fixedbugs/issue25897a.go

    		// wrapper closure for the "go" statement.
    		f := reflect.MakeFunc(reflect.TypeOf(((func(*int))(nil))),
    			func(args []reflect.Value) []reflect.Value {
    				c <- true
    				return nil
    			}).Interface().(func(*int))
    		go f(nil)
    
    		g := reflect.MakeFunc(reflect.TypeOf(((func())(nil))),
    			func(args []reflect.Value) []reflect.Value {
    				c <- true
    				return nil
    			}).Interface().(func())
    		go g()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 19:04:48 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  6. pkg/config/schema/collections/collections.gen.go

    		VersionAliases: []string{
    			"v1",
    		},
    		Proto: "istio.security.v1beta1.AuthorizationPolicy", StatusProto: "istio.meta.v1alpha1.IstioStatus",
    		ReflectType: reflect.TypeOf(&istioioapisecurityv1beta1.AuthorizationPolicy{}).Elem(), StatusType: reflect.TypeOf(&istioioapimetav1alpha1.IstioStatus{}).Elem(),
    		ProtoPackage: "istio.io/api/security/v1beta1", StatusPackage: "istio.io/api/meta/v1alpha1",
    		ClusterScoped: false,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 31.4K bytes
    - Viewed (0)
  7. association.go

    				switch reflectValue.Kind() {
    				case reflect.Slice, reflect.Array:
    					for i := 0; i < reflectValue.Len(); i++ {
    						association.Error = rel.Field.Set(association.DB.Statement.Context, reflectValue.Index(i), reflect.Zero(rel.Field.FieldType).Interface())
    					}
    				case reflect.Struct:
    					association.Error = rel.Field.Set(association.DB.Statement.Context, reflectValue, reflect.Zero(rel.Field.FieldType).Interface())
    				}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  8. src/encoding/json/encode.go

    		reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr,
    		reflect.Float32, reflect.Float64,
    		reflect.Interface, reflect.Pointer:
    		return v.IsZero()
    	}
    	return false
    }
    
    func (e *encodeState) reflectValue(v reflect.Value, opts encOpts) {
    	valueEncoder(v)(e, v, opts)
    }
    
    type encOpts struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  9. src/encoding/json/decode.go

    	switch v.Kind() {
    	case reflect.Map:
    		// Map key must either have string kind, have an integer kind,
    		// or be an encoding.TextUnmarshaler.
    		switch t.Key().Kind() {
    		case reflect.String,
    			reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
    			reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
    		default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  10. src/encoding/gob/encode.go

    }
    
    var encOpTable = [...]encOp{
    	reflect.Bool:       encBool,
    	reflect.Int:        encInt,
    	reflect.Int8:       encInt,
    	reflect.Int16:      encInt,
    	reflect.Int32:      encInt,
    	reflect.Int64:      encInt,
    	reflect.Uint:       encUint,
    	reflect.Uint8:      encUint,
    	reflect.Uint16:     encUint,
    	reflect.Uint32:     encUint,
    	reflect.Uint64:     encUint,
    	reflect.Uintptr:    encUint,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 19K bytes
    - Viewed (0)
Back to top