3 ms·
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 "
by bumbledraven 8y ago
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 https://play.golang.org/p/pIMgeQzOSZK
- bogomipz 8y agoThanks, 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.