Source file tour/moretypes/range.go
1 //go:build OMIT 2 3 package main 4 5 import "fmt" 6 7 var pow = []int{1, 2, 4, 8, 16, 32, 64, 128} 8 9 func main() { 10 for i, v := range pow { 11 fmt.Printf("2**%d = %d\n", i, v) 12 } 13 } 14
1 //go:build OMIT 2 3 package main 4 5 import "fmt" 6 7 var pow = []int{1, 2, 4, 8, 16, 32, 64, 128} 8 9 func main() { 10 for i, v := range pow { 11 fmt.Printf("2**%d = %d\n", i, v) 12 } 13 } 14