Skip to content

Instantly share code, notes, and snippets.

@maciej
Created December 9, 2019 09:42
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 maciej/e5a3ca5644e5b803017000f1ee0ab338 to your computer and use it in GitHub Desktop.
Save maciej/e5a3ca5644e5b803017000f1ee0ab338 to your computer and use it in GitHub Desktop.
Go Puzzler #3
package main
import (
"fmt"
"time"
)
func main() {
defer func() {
if r := recover(); r != nil {
fmt.Println("Recovered!")
}
}()
go func() {
panic("Panicking!")
}()
time.Sleep(200 * time.Microsecond)
fmt.Println("Goodbye!")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment