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

简单入门golang-结构体和方法 #167

Open
standchan opened this issue Jun 1, 2022 · 0 comments
Open

简单入门golang-结构体和方法 #167

standchan opened this issue Jun 1, 2022 · 0 comments

Comments

@standchan
Copy link

“内置的数据类型切片 slice 和字典 map 都是引用类型,不需要任何额外操作,所以传递这两种类型作为函数参数,是比较危险的,开发的时候需要谨慎操作。”

这个地方貌似表达有问题,只有map在传参的时候是传地址,其他都是值拷贝,包括slice

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

1 participant