Skip to content

Commit 00a68b6

Browse files
fixed code ordering
1 parent 3516a73 commit 00a68b6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

topics/language/pointers/example5/example5.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package main
66

77
// Number of elements to grow each stack frame.
88
// Run with 10 and then with 1024
9-
const size = 10
9+
const size = 1024
1010

1111
// main is the entry point for the application.
1212
func main() {

topics/language/slices/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ https://github.com/golang/go/wiki/SliceTricks
2727
[Reference Types](example2/example2.go) ([Go Playground](https://play.golang.org/p/gVWb35XjwM))
2828
[Appending slices](example4/example4.go) ([Go Playground](https://play.golang.org/p/xiI54S0bSN))
2929
[Taking slices of slices](example3/example3.go) ([Go Playground](https://play.golang.org/p/Okc2EZG5_M))
30-
[Slices and References](example5/example5.go) ([Go Playground](https://play.golang.org/p/q0ZHf3Yoln))
30+
[Slices and References](example5/example5.go) ([Go Playground](https://play.golang.org/p/zYT3ls_DuV))
3131
[Strings and slices](example6/example6.go) ([Go Playground](https://play.golang.org/p/x0Q5ByzxGS))
3232
[Variadic functions](example7/example7.go) ([Go Playground](https://play.golang.org/p/aTGRT1rhoO))
3333

topics/language/slices/example5/example5.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ func main() {
1212
// Declare a slice of integers with 7 values.
1313
x := make([]int, 7)
1414

15-
// Set a pointer to the second element of the slice.
16-
twohundred := &x[1]
17-
1815
// Random starting counters.
1916
for i := 0; i < 7; i++ {
2017
x[i] = i * 100
2118
}
2219

20+
// Set a pointer to the second element of the slice.
21+
twohundred := &x[1]
22+
2323
// Append a new value to the slice.
2424
x = append(x, 800)
2525

0 commit comments

Comments
 (0)