Files
deep_go/lessons/functions/defer_with_function/main.go

22 lines
209 B
Go
Raw Normal View History

package main
import "fmt"
func get() string {
fmt.Println("1")
return ""
}
func handle(string) {
fmt.Println("3")
}
func process() {
defer handle(get())
fmt.Println("2")
}
func main() {
process()
}