1
0
Fork 0
mirror of https://github.com/vbatts/talks.git synced 2025-10-27 10:46:42 +00:00

flatten folder

This commit is contained in:
Vincent Batts 2015-02-06 01:04:10 +01:00
parent 5783dd7f09
commit ffd598d420
12 changed files with 15 additions and 12 deletions

View file

@ -0,0 +1,25 @@
// +build ignore
package main
import "fmt"
func main() {
// START1 OMIT
names := []string{
"Michael",
"Jan",
"Sean",
"Silvia",
}
for i, name := range names {
fmt.Printf("%q is the %d name\n", name, i)
}
for i := range names {
fmt.Printf("%q is the %d name\n", names[i], i)
}
for _, name := range names {
fmt.Printf("%q is the ... name\n", name)
}
// STOP1 OMIT
}