Skip to content

Commit d51709a

Browse files
committed
Rename range example to prepare for expansion
1 parent f7120b2 commit d51709a

14 files changed

+33
-31
lines changed

examples.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Switch
88
Arrays
99
Slices
1010
Maps
11-
Range
1211
Functions
1312
Multiple Return Values
1413
Variadic Functions
1514
Closures
1615
Recursion
16+
Range over Built-in Types
1717
Pointers
1818
Strings and Runes
1919
Structs

examples/range/range.go renamed to examples/range-over-built-in-types/range-over-built-in-types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// _range_ iterates over elements in a variety of data
2-
// structures. Let's see how to use `range` with some
3-
// of the data structures we've already learned.
1+
// _range_ iterates over elements in a variety of
2+
// built-in data structures. Let's see how to
3+
// use `range` with some of the data structures
4+
// we've already learned.
45

56
package main
67

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
3d8c61f02f98892be9d3ff25d48da0bfb31bbd25
2+
S171w0PjgsD

examples/range/range.sh renamed to examples/range-over-built-in-types/range-over-built-in-types.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$ go run range.go
1+
$ go run range-over-built-in-types.go
22
sum: 9
33
index: 1
44
a -> apple

examples/range-over-channels/range-over-channels.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// In a [previous](range) example we saw how `for` and
1+
// In a [previous](range-over-built-in-types) example we saw how `for` and
22
// `range` provide iteration over basic data structures.
33
// We can also use this syntax to iterate over
44
// values received from a channel.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1812ab409c07ea4209106ee4c0d2eb597fccd717
2-
yQMclmwOYs9
1+
446dea3a7cb9e16ce3e17a6649c719e764936740
2+
8vAhX6eX1wy

examples/range/range.hash

Lines changed: 0 additions & 2 deletions
This file was deleted.

public/functions

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/index.html

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/maps

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)