Skip to content

Commit

Permalink
perhaps this is more accurate, unless the optional parameter was
Browse files Browse the repository at this point in the history
intentionally left out
  • Loading branch information
cdarwin committed Apr 26, 2012
1 parent 6222160 commit 84819ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions about_allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84819ea

Please sign in to comment.