FAQ

On Thursday, December 11, 2014 2:51:31 PM UTC-6, andrey mirtchovski wrote:
it is most definitely not a bug. see
http://golang.org/src/fmt/print.go?#L1004

chan, func(), and unsafe ptr get treated like pointers. code around
line 575 there gives the applicable verbs for pointers: p, v, b, d, o,
x, X.
this
    x := new(struct{})
    fmt.Printf("%d <-- that is not an int\n", x)
    fmt.Printf("%p\n", x)

produces

&{} <-- that is not an int
0x1a9f20


O.o

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 9 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedDec 11, '14 at 7:45p
activeDec 11, '14 at 9:34p
posts9
users4
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase