Created
June 25, 2022 15:36
-
-
Save GhazeyAhmed/4151c1da38d7d8dddb48757dc3066b39 to your computer and use it in GitHub Desktop.
DeferWithPanic
This file contains 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() { | |
One() | |
} | |
func One() { | |
Two() | |
} | |
func Two() { | |
defer fmt.Println("deferred in two") | |
Three() | |
} | |
func Three() { | |
panic("too deep") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment