go-playground/da_tour/datour/defer-milti.go

14 lines
153 B
Go

package datour
import "fmt"
func DeferMulti() {
fmt.Println("counting")
for i := 0; i < 10; i++ {
defer fmt.Println(i)
}
fmt.Println("done")
}