aboutsummaryrefslogtreecommitdiff
path: root/src/builtin
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2016-09-08 09:12:50 -0700
committerIan Lance Taylor <iant@golang.org>2016-09-10 12:57:37 +0000
commitca993d679729dbf312530d15f0489a45d1b61eaa (patch)
tree3a70fb85de8f794634cb9b46e23d2c084db38171 /src/builtin
parente273a2794639692a216c46a0043e5e6929e0a959 (diff)
downloadgo-ca993d679729dbf312530d15f0489a45d1b61eaa.tar.gz
go-ca993d679729dbf312530d15f0489a45d1b61eaa.zip
builtin: clarify that make(map[K]V, n) allocates space for n elements
Change-Id: Id6265b6093edaa4be2c59e4799351082f7228b5d Reviewed-on: https://go-review.googlesource.com/28815 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/builtin')
-rw-r--r--src/builtin/builtin.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/builtin/builtin.go b/src/builtin/builtin.go
index d63ad22c32..281de0b436 100644
--- a/src/builtin/builtin.go
+++ b/src/builtin/builtin.go
@@ -173,8 +173,8 @@ func cap(v Type) int
// specify a different capacity; it must be no smaller than the
// length, so make([]int, 0, 10) allocates a slice of length 0 and
// capacity 10.
-// Map: An initial allocation is made according to the size but the
-// resulting map has length 0. The size may be omitted, in which case
+// Map: An empty map is allocated with enough space to hold the
+// specified number of elements. The size may be omitted, in which case
// a small starting size is allocated.
// Channel: The channel's buffer is initialized with the specified
// buffer capacity. If zero, or the size is omitted, the channel is