golang defer
package main
import "fmt"
func main() {
a := test()
fmt.Println("print a:", a)
}
func test() int {
defer fmt.Println("A")
defer fmt.Println("B")
var a int = 2
defer func() {
a++
fmt.Println("print defer a:", a)
}()
return a
}