Created
October 12, 2016 20:54
-
-
Save mlowicki/6d6f6055e50cab5ad480bcdf56791a56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
f := func() {} | |
f = nil | |
fmt.Println("Before defer statement") | |
defer f() | |
fmt.Println("After defer statement") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment