mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:06:41 +08:00
fix value undefined error.
This commit is contained in:
@@ -9,8 +9,6 @@ if value, err := pack1.Func1(param1); err != nil {
|
||||
fmt.Printf(“Error %s in pack1.Func1 with parameter %v”, err.Error(), param1)
|
||||
return err
|
||||
}
|
||||
// 函数Func1没有错误:
|
||||
Process(value)
|
||||
|
||||
e.g.: os.Open(file) strconv.Atoi(str)
|
||||
```
|
||||
@@ -73,4 +71,4 @@ if value, ok := varI.(T); ok {
|
||||
|
||||
- [目录](directory.md)
|
||||
- 上一节:[模式](17.0.md)
|
||||
- 下一节:[关于defer模式](17.2.md)
|
||||
- 下一节:[关于defer模式](17.2.md)
|
||||
|
Reference in New Issue
Block a user