- Sort Score
- Result 10 results
- Languages All
Results 21 - 27 of 27 for CanAddr (0.21 sec)
-
src/internal/reflectlite/value.go
// - flagStickyRO: obtained via unexported not embedded field, so read-only // - flagEmbedRO: obtained via unexported embedded field, so read-only // - flagIndir: val holds a pointer to the data // - flagAddr: v.CanAddr is true (implies flagIndir) // Value cannot represent method values. // The next five bits give the Kind of the value. // This repeats typ.Kind() except for method values.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 17:01:54 UTC 2024 - 13.6K bytes - Viewed (0) -
src/encoding/gob/encode.go
rt = rt.Elem() } } var op encOp op = func(i *encInstr, state *encoderState, v reflect.Value) { if ut.encIndir == -1 { // Need to climb up one level to turn value into pointer. if !v.CanAddr() { errorf("unaddressable value of type %s", rt) } v = v.Addr() } if !state.sendZero && v.IsZero() { return } state.update(i) state.enc.encodeGobEncoder(state.b, ut, v) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 02:00:26 UTC 2024 - 19K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go
} // reflection requires that the value be addressable in order to call set, // so we must ensure the value we created is available on the heap (not a problem // for normal usage) if !tt.args.v.CanAddr() { x := reflect.New(tt.args.v.Type()) x.Elem().Set(tt.args.v) tt.args.v = x.Elem() } growSlice(tt.args.v, tt.args.maxCapacity, tt.args.sizes...) if tt.cap != tt.args.v.Cap() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 11 12:45:33 UTC 2024 - 26.5K bytes - Viewed (0) -
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) -
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) -
src/reflect/all_test.go
e0[j] = ValueOf(e) } // Convert extra from []int to *SliceValue. e1 := ValueOf(test.extra) // Test Append. a0 := ValueOf(&test.orig).Elem() have0 := Append(a0, e0...) if have0.CanAddr() { t.Errorf("Append #%d: have slice should not be addressable", i) } if !DeepEqual(have0.Interface(), want) { t.Errorf("Append #%d: have %v, want %v (%p %p)", i, have0, want, test.orig, have0.Interface()) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 218.8K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"(StructTag).Lookup", Method, 7}, {"(Value).Addr", Method, 0}, {"(Value).Bool", Method, 0}, {"(Value).Bytes", Method, 0}, {"(Value).Call", Method, 0}, {"(Value).CallSlice", Method, 0}, {"(Value).CanAddr", Method, 0}, {"(Value).CanComplex", Method, 18}, {"(Value).CanConvert", Method, 17}, {"(Value).CanFloat", Method, 18}, {"(Value).CanInt", Method, 18}, {"(Value).CanInterface", Method, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)