ch1-basic/ch1-07-error-and-panic #614
Replies: 4 comments 7 replies
-
工程中大量的if err!= handler(); err != nil { xxxx} 这个就感觉很难看了。 |
Beta Was this translation helpful? Give feedback.
4 replies
-
上面的代码虽然能够工作,但是隐藏一个 bug。如果第一个 os.Open 调用成功,但是第二个 os.Create 调用失败,那么会在没有释放 src 文件资源的情况下返回。 函数return之后,函数内部创建的变量不应该也随之释放了吗?为什么会出现bug呢? |
Beta Was this translation helpful? Give feedback.
3 replies
-
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
|
Beta Was this translation helpful? Give feedback.
0 replies
-
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ch1-basic/ch1-07-error-and-panic
Go语言高级编程
https://chai2010.cn/advanced-go-programming-book/ch1-basic/ch1-07-error-and-panic.html
Beta Was this translation helpful? Give feedback.
All reactions