Underlying is the identity function for all types except *types.Named
(
https://github.com/golang/example/tree/master/gotypes#named-types),
so this won't get you what you want.
Instead what I think you're after is type asserting against the
types.Type you have
(
https://github.com/golang/example/tree/master/gotypes#types):
Type = *Basic
| *Pointer
| *Array
| *Slice
| *Map
| *Chan
| *Struct
| *Tuple
| *Signature
| *Named
| *Interface
Then walking "inside" the respective type as required. For example,
you'll probably want to dereference a *types.Pointer via Elem(),
similarly for a slice. For a map you potentially have a more complex
decision with two types!
Paul
> --
> 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...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.