mirror of
https://github.com/golang/go
synced 2024-11-25 03:27:58 -07:00
doc: fix another typo in article on defer, panic and recover
Fixes #3177 R=adg CC=golang-dev https://golang.org/cl/5728057
This commit is contained in:
parent
dd29609244
commit
54875a7a7f
@ -236,7 +236,7 @@ panic PC=0x2a9cd8
|
|||||||
For a real-world example of <b>panic</b> and <b>recover</b>, see the
|
For a real-world example of <b>panic</b> and <b>recover</b>, see the
|
||||||
<a href="/pkg/encoding/json/">json package</a> from the Go standard library.
|
<a href="/pkg/encoding/json/">json package</a> from the Go standard library.
|
||||||
It decodes JSON-encoded data with a set of recursive functions.
|
It decodes JSON-encoded data with a set of recursive functions.
|
||||||
When malformed JSON is encountered, the parser calls panic is to unwind the
|
When malformed JSON is encountered, the parser calls panic to unwind the
|
||||||
stack to the top-level function call, which recovers from the panic and returns
|
stack to the top-level function call, which recovers from the panic and returns
|
||||||
an appropriate error value (see the 'error' and 'unmarshal' functions in
|
an appropriate error value (see the 'error' and 'unmarshal' functions in
|
||||||
<a href="/src/pkg/encoding/json/decode.go">decode.go</a>).
|
<a href="/src/pkg/encoding/json/decode.go">decode.go</a>).
|
||||||
|
@ -157,7 +157,7 @@ panic PC=0x2a9cd8
|
|||||||
For a real-world example of <b>panic</b> and <b>recover</b>, see the
|
For a real-world example of <b>panic</b> and <b>recover</b>, see the
|
||||||
<a href="/pkg/encoding/json/">json package</a> from the Go standard library.
|
<a href="/pkg/encoding/json/">json package</a> from the Go standard library.
|
||||||
It decodes JSON-encoded data with a set of recursive functions.
|
It decodes JSON-encoded data with a set of recursive functions.
|
||||||
When malformed JSON is encountered, the parser calls panic is to unwind the
|
When malformed JSON is encountered, the parser calls panic to unwind the
|
||||||
stack to the top-level function call, which recovers from the panic and returns
|
stack to the top-level function call, which recovers from the panic and returns
|
||||||
an appropriate error value (see the 'error' and 'unmarshal' functions in
|
an appropriate error value (see the 'error' and 'unmarshal' functions in
|
||||||
<a href="/src/pkg/encoding/json/decode.go">decode.go</a>).
|
<a href="/src/pkg/encoding/json/decode.go">decode.go</a>).
|
||||||
|
Loading…
Reference in New Issue
Block a user