|
|
@@ -21,7 +21,7 @@ func function1() {
|
|
|
}
|
|
|
|
|
|
func function2() {
|
|
|
- fmt.Printf("function2: Deferred until the end of the calling function!")
|
|
|
+ fmt.Printf("Function2: Deferred until the end of the calling function!")
|
|
|
}
|
|
|
```
|
|
|
|
|
|
@@ -142,7 +142,7 @@ func trace(s string) { fmt.Println("entering:", s) }
|
|
|
func untrace(s string) { fmt.Println("leaving:", s) }
|
|
|
```
|
|
|
|
|
|
-以下代码展示了何时调用两个函数:
|
|
|
+以下代码展示了何时调用这两个函数:
|
|
|
|
|
|
示例 6.10 [defer_tracing.go](examples/chapter_6/defer_tracing.go):
|
|
|
|