Hi all, I'm trying to understand what *exactly* the .(type) is doing in the following statement
switch foo := bar.(type) I mean, I get that foo is being assigned a type converted version of the bar interface, but, I want to see what exactly they .(type) call does. I have found https://github.com/golang/go/blob/master/src/go/types/selection.go#L60 which I *think* is the method being called, but I am not sure. So I have two questions. 1) Am I looking at the correct function 2) (and far more importantly) How do I find which method such code is calling (it's problematic for me at this point towork out what, for example, something defined in builtin is really calling. Can someone point me at a resource that I have obviously overlooked? Note: I've seen this https://stackoverflow.com/questions/18512781/built-in-source-code-location and, rereading it this morning it looks like "If it's not in the runtime package, start grepping the compiler packages" - is that what I should be doing? -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e52c6dbc-1cb8-44c1-a45b-be93c89bb1b7o%40googlegroups.com.