Skip to content

Instantly share code, notes, and snippets.

@GhazeyAhmed
Created June 25, 2022 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GhazeyAhmed/4151c1da38d7d8dddb48757dc3066b39 to your computer and use it in GitHub Desktop.
Save GhazeyAhmed/4151c1da38d7d8dddb48757dc3066b39 to your computer and use it in GitHub Desktop.
DeferWithPanic
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