Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for allowAddr (0.07 sec)

  1. src/encoding/json/encode.go

    // The returned encoder only checks CanAddr when allowAddr is true.
    func newTypeEncoder(t reflect.Type, allowAddr bool) encoderFunc {
    	// If we have a non-pointer value whose type implements
    	// Marshaler with a value receiver, then we're better off taking
    	// the address of the value - otherwise we end up with an
    	// allocation as we cast the value to an interface.
    	if t.Kind() != reflect.Pointer && allowAddr && reflect.PointerTo(t).Implements(marshalerType) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
Back to top