github.com/traefik/yaegi@v0.15.1/_test/defer2.go (about)

     1  package main
     2  
     3  import "fmt"
     4  
     5  func main() {
     6  	println("hello")
     7  	i := 12
     8  	defer func() {
     9  		fmt.Println("i:", i)
    10  	}()
    11  	i = 20
    12  	println("world")
    13  }
    14  
    15  // Output:
    16  // hello
    17  // world
    18  // i: 20