mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 00:11:36 +08:00
fix sample code bug & reformat some sample code (#557)
* Update 01.2.md 删除: - 不支持断言 * Formatting 问题5.1 code * Formatting 问题5.3 code * Correct the translation - correct `令 v := map1[key1] 可以将 key1 对应的值赋值为 v` to `令 v := map1[key1] 可以将 key1 对应的值赋值给 v` * Modified sample code - Add `defer fi.Close()` on `示例 12.7` * Reformatting some sample code on 13.3 * Update 14.2.md * Reformatting the sample code.
This commit is contained in:
@@ -14,7 +14,7 @@ func protect(g func()) {
|
||||
log.Println("done")
|
||||
// Println executes normally even if there is a panic
|
||||
if err := recover(); err != nil {
|
||||
log.Printf("run time panic: %v", err)
|
||||
log.Printf("run time panic: %v", err)
|
||||
}
|
||||
}()
|
||||
log.Println("start")
|
||||
|
Reference in New Issue
Block a user