diff --git a/examples/defer/defer.go b/examples/defer/defer.go index d8fa3b8..037bb53 100644 --- a/examples/defer/defer.go +++ b/examples/defer/defer.go @@ -14,3 +14,5 @@ func main() { defer second() first() } + +// todo: review http://blog.golang.org/2010/08/defer-panic-and-recover.html diff --git a/examples/panic/panic.go b/examples/panic/panic.go index 82b79f3..e39ae61 100644 --- a/examples/panic/panic.go +++ b/examples/panic/panic.go @@ -1,9 +1,11 @@ // A `panic` means something went unexpectedly wrong. // Mostly we use it to fail fast on errors that // shouldn't occur during normal operation. + package main func main() { + // We'll use panic throught this book to check for // unexpected errors. This is the only program in the // book designed to panic.