Created
December 9, 2019 09:42
-
-
Save maciej/e5a3ca5644e5b803017000f1ee0ab338 to your computer and use it in GitHub Desktop.
Go Puzzler #3
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" | |
"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