diff --git a/examples/panic/panic.go b/examples/panic/panic.go index 4c0c9b0..14d49b0 100644 --- a/examples/panic/panic.go +++ b/examples/panic/panic.go @@ -14,7 +14,7 @@ func main() { // site designed to panic. panic("a problem") - // A common use of panic is to abort if function + // A common use of panic is to abort if a function // returns an error value that we don't know how to // (or want to) handle. Here's an example of // `panic`king if we get an unexpected error when creating a new file. diff --git a/examples/panic/panic.sh b/examples/panic/panic.sh index d371bff..a851be9 100644 --- a/examples/panic/panic.sh +++ b/examples/panic/panic.sh @@ -1,4 +1,4 @@ -# Running the program will cause it to panic, print +# Running this program will cause it to panic, print # an error message and goroutine traces, and exit with # a non-zero status. $ go run panic.go @@ -13,4 +13,3 @@ exit status 2 # Note that unlike some languages which use exceptions # for handling of many errors, in Go it is idiomatic # to use error-indicating return values wherever possible. -# We'll learn more about this in later examples.