I think I must have asked this really badly. I don't want a reflect.Type of an error, I want a types.Type representation of error for performing static analysis.
The playground that I imagine is necessary is something like this. https://play.golang.org/p/e-FU0_4J9jK This seem massively over complicated, so I'm wondering if there is an easier way. On Sat, 2019-12-14 at 19:37 +1030, Dan Kortschak wrote: > In the go/types package there is an easy way to obtain a types.Type > for > basic builtin types. This doesn't exist for the error type. > > Is there an easier way to get a types.Type representing error than by > using NewInterfaceType, NewFunc and NewSignature functions (I am > assuming that the nil *types.Package is what should be used for the > call to NewFunc). > > thanks > Dan > -- 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/5734a9fb1f8261b94545bc6f451be552a74029e6.camel%40kortschak.io.