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

微信阅读 14.3 关于Go不允许获取map中value的地址的示例代码错误 #17

Closed
bravility opened this issue Jun 9, 2022 · 1 comment

Comments

@bravility
Copy link

原书内容:
image

原书代码:

p := m[key]  // 无法获取m[key]的地址
fmt.Println(p)

应该勘误为:

p := m[key]  // 无法获取m[key]的地址
fmt.Println(p)

具体运行结果对比如下:
demo_suc
demo_err

@bigwhite bigwhite reopened this Jun 24, 2022
@bigwhite
Copy link
Owner

感谢指出,已更新到勘误表。

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