Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

翻译错误和未删除的原文 #49

Closed
ChnMig opened this issue May 17, 2022 · 1 comment
Closed

翻译错误和未删除的原文 #49

ChnMig opened this issue May 17, 2022 · 1 comment

Comments

@ChnMig
Copy link
Contributor

ChnMig commented May 17, 2022

你好, 感谢你的翻译, 这对我很有帮助, 我在查看过程中发现 https://github.com/xxjwxc/uber_go_guide_cn#%E9%94%99%E8%AF%AF%E5%8C%85%E8%A3%85 处的表述与原文不一致,
原文是 https://github.com/uber-go/guide/blob/master/style.md#error-wrapping

return the original error as-is
add context with fmt.Errorf and the %w verb
add context with fmt.Errorf and the %v verb

意思是

将原始错误原样返回
使用 fmt.Errorf 搭配 %w 将错误添加进上下文后返回
使用 fmt.Errorf 搭配 %v 将错误添加进上下文后返回

而 master 的描述是

按原样返回原始错误
add context with fmt.Errorf and the %w verb
使用fmt.Errorf和%w
使用 fmt.Errorf 和 %v

这可能会造成误解

@xxjwxc
Copy link
Owner

xxjwxc commented May 17, 2022

请提pr,我来合并,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants