commit | c899dcdb12f3a5b636661162ef58589952741839 | [log] [tgz] |
---|---|---|
author | Katrina Owen <katrina.owen@gmail.com> | Tue Feb 09 18:12:25 2016 +1100 |
committer | Andrew Gerrand <adg@golang.org> | Tue Feb 09 07:16:28 2016 +0000 |
tree | b373c1991c80dee6feed26d86cffe3c9a50b37ab | |
parent | 1631c208f723828abbecbd92bdceb4000b0042e1 [diff] |
content: tweak making-slices example for readability Adding a bit of whitespace makes the code example more scannable. Change-Id: Ib8cc8ff2847c3e89d1cd1fcf1e6a0a0aaa562e81 Reviewed-on: https://go-review.googlesource.com/19401 Reviewed-by: Andrew Gerrand <adg@golang.org>
diff --git a/content/moretypes/making-slices.go b/content/moretypes/making-slices.go index 894ee65..2dae8de 100644 --- a/content/moretypes/making-slices.go +++ b/content/moretypes/making-slices.go
@@ -7,10 +7,13 @@ func main() { a := make([]int, 5) printSlice("a", a) + b := make([]int, 0, 5) printSlice("b", b) + c := b[:2] printSlice("c", c) + d := c[2:5] printSlice("d", d) }