- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for CanAddr (0.17 sec)
-
callbacks/update.go
for i := 0; i < stmt.ReflectValue.Len(); i++ { if stmt.ReflectValue.CanAddr() { field.Set(stmt.Context, stmt.ReflectValue.Index(i), value) } } } case reflect.Struct: assignValue = func(field *schema.Field, value interface{}) { if stmt.ReflectValue.CanAddr() { field.Set(stmt.Context, stmt.ReflectValue, value) } } default:
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Mar 18 05:44:55 UTC 2024 - 9.4K bytes - Viewed (0) -
src/encoding/xml/marshal.go
typ := val.Type() // Check for marshaler. if val.CanInterface() && typ.Implements(marshalerType) { return p.marshalInterface(val.Interface().(Marshaler), defaultStart(typ, finfo, startTemplate)) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(marshalerType) { return p.marshalInterface(pv.Interface().(Marshaler), defaultStart(pv.Type(), finfo, startTemplate)) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 18:46:41 UTC 2024 - 31.2K bytes - Viewed (0) -
src/encoding/gob/encgen.go
package gob import ( "reflect" ) ` const arrayHelper = ` func enc%[2]sArray(state *encoderState, v reflect.Value) bool { // Can only slice if it is addressable. if !v.CanAddr() { return false } return enc%[2]sSlice(state, v.Slice(0, v.Len())) } ` const sliceHelper = ` func enc%[2]sSlice(state *encoderState, v reflect.Value) bool { slice, ok := v.Interface().([]%[1]s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 22 16:39:09 UTC 2024 - 3.8K bytes - Viewed (0) -
src/encoding/gob/decgen.go
import ( "math" "reflect" ) ` const arrayHelper = ` func dec%[2]sArray(state *decoderState, v reflect.Value, length int, ovfl error) bool { // Can only slice if it is addressable. if !v.CanAddr() { return false } return dec%[2]sSlice(state, v.Slice(0, v.Len()), length, ovfl) } ` const sliceHelper = ` func dec%[2]sSlice(state *decoderState, v reflect.Value, length int, ovfl error) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 14:15:38 UTC 2024 - 5.3K bytes - Viewed (0) -
association.go
if association.Relationship.Field.FieldType.Kind() == reflect.Struct { assignBacks = append(assignBacks, assignBack{Source: source, Dest: rv.Index(0)}) } } case reflect.Struct: if !rv.CanAddr() { association.Error = ErrInvalidValue return } association.Error = association.Relationship.Field.Set(association.DB.Statement.Context, source, rv.Addr().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) -
statement.go
destValue := reflect.ValueOf(stmt.Dest) for destValue.Kind() == reflect.Ptr { destValue = destValue.Elem() } if stmt.ReflectValue != destValue { if !destValue.CanAddr() { destValueCanAddr := reflect.New(destValue.Type()) destValueCanAddr.Elem().Set(destValue) stmt.Dest = destValueCanAddr.Interface() destValue = destValueCanAddr.Elem() }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 19.8K bytes - Viewed (0) -
callbacks.go
} } // assign stmt.ReflectValue if stmt.Dest != nil { stmt.ReflectValue = reflect.ValueOf(stmt.Dest) for stmt.ReflectValue.Kind() == reflect.Ptr { if stmt.ReflectValue.IsNil() && stmt.ReflectValue.CanAddr() { stmt.ReflectValue.Set(reflect.New(stmt.ReflectValue.Type().Elem())) } stmt.ReflectValue = stmt.ReflectValue.Elem() } if !stmt.ReflectValue.IsValid() { db.AddError(ErrInvalidValue) }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Tue Mar 26 03:33:36 UTC 2024 - 8.6K bytes - Viewed (0) -
scan.go
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10K bytes - Viewed (0) -
src/cmd/compile/internal/test/inl_test.go
"FullRuneInString", "RuneLen", "AppendRune", "ValidRune", }, "unicode/utf16": { "Decode", }, "reflect": { "Value.Bool", "Value.Bytes", "Value.CanAddr", "Value.CanComplex", "Value.CanFloat", "Value.CanInt", "Value.CanInterface", "Value.CanSet", "Value.CanUint", "Value.Cap", "Value.Complex", "Value.Float",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 09 04:07:57 UTC 2024 - 10.7K bytes - Viewed (0) -
src/text/template/exec.go
} // Unless it's an interface, need to get to a value of type *T to guarantee // we see all methods of T and *T. ptr := receiver if ptr.Kind() != reflect.Interface && ptr.Kind() != reflect.Pointer && ptr.CanAddr() { ptr = ptr.Addr() } if method := ptr.MethodByName(fieldName); method.IsValid() { return s.evalCall(dot, method, false, node, fieldName, args, final) } hasArgs := len(args) > 1 || !isMissing(final)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 21:22:24 UTC 2024 - 32K bytes - Viewed (0)