From 84819eab718aa16b7b174858a3541c39ba92e6ec Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Thu, 26 Apr 2012 14:49:23 -0700 Subject: [PATCH] perhaps this is more accurate, unless the optional parameter was intentionally left out --- about_allocation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/about_allocation.go b/about_allocation.go index 3d662ce..185a33a 100644 --- a/about_allocation.go +++ b/about_allocation.go @@ -15,8 +15,8 @@ func aboutAllocation() { slice := make([]int, 3) assert(len(slice) == __int__) // make() creates slices of a given length - slice = make([]int, 3) - assert(cap(slice) == 20) // but can also take an optional capacity + slice = make([]int, 3, __int__) // but can also take an optional capacity + assert(cap(slice) == 20) m := make(map[int]string) assert(len(m) == __int__) // make() also creates maps