Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 12 of 12 for CanAddr (0.09 sec)

  1. src/fmt/print.go

    		case 's', 'q', 'x', 'X':
    			// Handle byte and uint8 slices and arrays special for the above verbs.
    			t := f.Type()
    			if t.Elem().Kind() == reflect.Uint8 {
    				var bytes []byte
    				if f.Kind() == reflect.Slice || f.CanAddr() {
    					bytes = f.Bytes()
    				} else {
    					// We have an array, but we cannot Bytes() a non-addressable array,
    					// so we build a slice by hand. This is a rare case but it would be nice
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:22:43 UTC 2024
    - 31.8K bytes
    - Viewed (0)
  2. src/encoding/json/decode.go

    	haveAddr := false
    
    	// If v is a named type and is addressable,
    	// start with its address, so that if the type has pointer methods,
    	// we find them.
    	if v.Kind() != reflect.Pointer && v.Type().Name() != "" && v.CanAddr() {
    		haveAddr = true
    		v = v.Addr()
    	}
    	for {
    		// Load value from interface, but only if the result will be
    		// usefully addressable.
    		if v.Kind() == reflect.Interface && !v.IsNil() {
    			e := v.Elem()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
Back to top