Go

Go defer

2019-03-05  本文已影响0人  JaedenKil
package main

import "fmt"

func main() {
    defer fmt.Println("Defer printing")
    fmt.Println("a")
    fmt.Println("b")
    fmt.Println("c")
    fmt.Println("d")
}

Outputs:

a
b
c
d
Defer printing
上一篇下一篇

猜你喜欢

热点阅读