From 357626c292524e07a7994137d63324f2e193becf Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Fri, 27 Sep 2013 16:31:30 +1000 Subject: go.blog/slices: fix mistake in length of slice2. R=adg CC=golang-dev https://golang.org/cl/14013045 --- content/slices.article | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/slices.article b/content/slices.article index f2dd073..eb974e8 100644 --- a/content/slices.article +++ b/content/slices.article @@ -129,7 +129,7 @@ The underlying `sliceHeader` struct for the `slice2` variable looks like this: slice2 := sliceHeader{ - Length: 10, + Length: 5, ZerothElement: &buffer[105], } @@ -474,7 +474,7 @@ on the community-built * Nil As an aside, with our newfound knowledge we can see what the representation of a `nil` slice is. -Of course, it is the zero value of the slice header: +Naturally, it is the zero value of the slice header: sliceHeader{ Length: 0, -- cgit v1.2.3