mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2024-12-25 22:38:56 +00:00
Update ch5-09.md
修改源码和文件出处
This commit is contained in:
parent
aaa7e5afae
commit
65ee267d20
@ -96,8 +96,9 @@ src/gopl.io/ch5/defer1/defer.go:10
|
||||
|
||||
为了方便诊断问题,runtime包允许程序员输出堆栈信息。在下面的例子中,我们通过在main函数中延迟调用printStack输出堆栈信息。
|
||||
|
||||
<u><i>gopl.io/ch5/defer2</i></u>
|
||||
|
||||
```Go
|
||||
gopl.io/ch5/defer2
|
||||
func main() {
|
||||
defer printStack()
|
||||
f(3)
|
||||
|
Loading…
Reference in New Issue
Block a user