mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-11-13 09:16:10 +08:00
@@ -1,7 +1,7 @@
|
||||
# 18.6 函数
|
||||
|
||||
如何使用内建函数 `recover` 终止 `panic` 过程(参考[章节13.3](13.3.md)):
|
||||
|
||||
如何使用内建函数 `recover()` 终止 `panic()` 过程(参考[章节 13.3](13.3.md)):
|
||||
|
||||
```go
|
||||
func protect(g func()) {
|
||||
defer func() {
|
||||
|
||||
Reference in New Issue
Block a user