content/moretypes: use s to represent slices
Fixes golang/go#10666.
Change-Id: I40650edecd536e52c076fee29492107c3f536528
Reviewed-on: https://go-review.googlesource.com/9670
Reviewed-by: Andrew Gerrand <adg@golang.org>
diff --git a/content/moretypes/slices.go b/content/moretypes/slices.go
index 0e7c9f8..62b89d7 100644
--- a/content/moretypes/slices.go
+++ b/content/moretypes/slices.go
@@ -5,10 +5,10 @@
import "fmt"
func main() {
- p := []int{2, 3, 5, 7, 11, 13}
- fmt.Println("p ==", p)
+ s := []int{2, 3, 5, 7, 11, 13}
+ fmt.Println("s ==", s)
- for i := 0; i < len(p); i++ {
- fmt.Printf("p[%d] == %d\n", i, p[i])
+ for i := 0; i < len(s); i++ {
+ fmt.Printf("s[%d] == %d\n", i, s[i])
}
}
diff --git a/content/moretypes/slicing-slices.go b/content/moretypes/slicing-slices.go
index 4651e5b..27e1aef 100644
--- a/content/moretypes/slicing-slices.go
+++ b/content/moretypes/slicing-slices.go
@@ -5,13 +5,13 @@
import "fmt"
func main() {
- p := []int{2, 3, 5, 7, 11, 13}
- fmt.Println("p ==", p)
- fmt.Println("p[1:4] ==", p[1:4])
+ s := []int{2, 3, 5, 7, 11, 13}
+ fmt.Println("s ==", s)
+ fmt.Println("s[1:4] ==", s[1:4])
// missing low index implies 0
- fmt.Println("p[:3] ==", p[:3])
+ fmt.Println("s[:3] ==", s[:3])
// missing high index implies len(s)
- fmt.Println("p[4:] ==", p[4:])
+ fmt.Println("s[4:] ==", s[4:])
}