kreangkrai

fb.com/584867114995854_1086669051482322

Jul 22nd, 2018
1,033
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.31 KB | None | 0 0
  1. func main() {
  2.     defer fmt.Println("first")
  3.     fmt.Println("second")
  4.     fmt.Println("third")
  5.  
  6.     defer func() {
  7.         fmt.Println("func first")
  8.     }()
  9.     func() {
  10.         fmt.Println("func second")
  11.     }()
  12.     func() {
  13.         fmt.Println("func third")
  14.     }()
  15. }
  16. // Ouput
  17. /*second
  18. third
  19. func second
  20. func third
  21. func first
  22. first*/
Advertisement
Add Comment
Please, Sign In to add comment