Generally, you are looking for a `*ast.GenDecl` and its doc, which contains 
a `ast.TypeSpec`, when it is written as `type Name Type{ ... }`. However, 
though nearly never happened, people can write it as `type ( Name 
Type{....} )`, just like a `var` statement would. In that case, you are 
looking directly into `*ast.TypeSpec`s.

I have written a library for it some time ago, but I got extremely busy 
immediately so it was not documented, but you can read it (with help of 
tests) here: https://git.sr.ht/~leaf_bebop/astutil/tree/master/typedoc

-- 
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/91a7539f-50b2-4f30-816d-464aab169683o%40googlegroups.com.

Reply via email to