content: add explanation of slice expression syntax
Fixes golang/tour#66
Fixes golang/tour#67
Fixes golang/tour#68
Fixes golang/tour#177
Fixes golang/tour#209
Change-Id: Ie3d944a5baacd471a386dfd849f55b41dbd5db95
Reviewed-on: https://go-review.googlesource.com/44930
Reviewed-by: Andrew Gerrand <adg@golang.org>
diff --git a/content/moretypes.article b/content/moretypes.article
index eb8eab4..2a6138b 100644
--- a/content/moretypes.article
+++ b/content/moretypes.article
@@ -89,10 +89,18 @@
The type `[]T` is a slice with elements of type `T`.
-This expression creates a slice of the first five elements of the array `a`:
+A slice is formed by specifying two indices, a low and
+high bound, separated by a colon:
- a[0:5]
+ a[low : high]
+This selects a half-open range which includes the first
+element, but excludes the last one.
+
+The following expression creates a slice which includes
+elements 1 through 3 of `a`:
+
+ a[1:4]
.play moretypes/slices.go