Commit eebb9db0 authored by Robert Griesemer's avatar Robert Griesemer
Browse files

spec: clarify the difference between &T{} and new(T)

Add a small paragraph and example pointing out
the difference for the case where T is a slice
or map. This is a common error for Go novices.

Fixes #29425.

Change-Id: Icdb59f25361e9f6a09b190fbfcc9ae0c7d90077b
Reviewed-on: https://go-review.googlesource.com/c/go/+/176338


Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
parent 451cf3e2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment