Open utterances-bot opened 2 years ago
对于类型为 T 的操作数 x,地址操作符 &x 将生成一个类型为 *T 的指针指向 x。操作数必须可寻址,即,变量、间接指针、切片索引操作,或可寻址结构体的字段选择器,或可寻址数组的数组索�
https://shockerli.net/post/golang-faq-cannot-take-the-address/
mark, 转载到了 https://wangyue.dev
Go 挖坑指南: “cannot take the address of XXX” and “cannot call pointer method on XXX” - 格物
对于类型为 T 的操作数 x,地址操作符 &x 将生成一个类型为 *T 的指针指向 x。操作数必须可寻址,即,变量、间接指针、切片索引操作,或可寻址结构体的字段选择器,或可寻址数组的数组索�
https://shockerli.net/post/golang-faq-cannot-take-the-address/