Panic Recover Gopackage main func main() { // Running this will print out: defer func() { fmt.Println("error was:", recover()) }() panic("Shit!")