github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/defer1.gno (about)

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