Source file tour/flowcontrol/defer-multi.go
1 //go:build OMIT 2 3 package main 4 5 import "fmt" 6 7 func main() { 8 fmt.Println("counting") 9 10 for i := 0; i < 10; i++ { 11 defer fmt.Println(i) 12 } 13 14 fmt.Println("done") 15 } 16
1 //go:build OMIT 2 3 package main 4 5 import "fmt" 6 7 func main() { 8 fmt.Println("counting") 9 10 for i := 0; i < 10; i++ { 11 defer fmt.Println(i) 12 } 13 14 fmt.Println("done") 15 } 16