Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
bumbledraven
on June 20, 2018
|
parent
|
context
|
favorite
| on:
Common Mistakes for New Golang Devs
Go itself says you "cannot take the address" of some values. For example:
m := map[int]int{1: 2} p := &m[1]
The second line causes the compilation error "cannot take the address of m[1]".
https://play.golang.org/p/pIMgeQzOSZK
bogomipz
on June 20, 2018
[–]
Thanks, I think it was the wording "addressable" that was the source of my confusion. "cannot take the address of" seems more intuitive to me. Cheers.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
https://play.golang.org/p/pIMgeQzOSZK