Sorry, I wasn't clear. I'm using the go/types package to read go code and generate wrapper code for it. And I need to generate different code based on the types of parameters a function takes.
So like if a function takes a *bytes.Buffer to write to and I am generating a wrapper that wants the output written to an io.Writer, I need to generate wrapper code that creates the buffer, passes it to the function and then writes it to the writer output. So, when reading a function via go/types, it has a Parameter() Tuple, and I can get the types.Type of each one, but I don't know how to say "Is this types.Type a *bytes.Buffer?" -- 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. For more options, visit https://groups.google.com/d/optout.