We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dd9c40 commit 049782dCopy full SHA for 049782d
src/encoding/json/encode.go
@@ -384,7 +384,8 @@ var (
384
385
// newTypeEncoder constructs an encoderFunc for a type.
386
// The returned encoder only checks CanAddr when allowAddr is true.
387
-func newTypeEncoder(t reflect.Type, allowAddr bool) encoderFunc { // If we have a non-pointer value whose type implements
+func newTypeEncoder(t reflect.Type, allowAddr bool) encoderFunc {
388
+ // If we have a non-pointer value whose type implements
389
// Marshaler with a value receiver, then we're better off taking
390
// the address of the value - otherwise we end up with an
391
// allocation as we cast the value to an interface.
0 commit comments