Thanks, I have a bash script that I use to examine the assembly code that is generated by a given go file https://bpa.st/MRJ4IWJFJ5YNHXFLCMMYGGSI3A
But that takes me past the code that was used to generate that assembly I'm wanting the midpoint here, the code that the compiler sees, in order to generate the assembly. On Wednesday, July 29, 2020 at 12:20:17 PM UTC+10, tokers wrote: > > You may try to use `go tool compile -S <filename>` and read the assemble > codes to find the truth. > > On Wednesday, July 29, 2020 at 5:39:53 AM UTC+8 shan...@gmail.com wrote: > >> 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/3cc9eb52-ba92-4c80-8b4a-95fd778785ebo%40googlegroups.com.