Hi, I was working on a tool for internal use where I had to work with the go's abstract syntax tree specially with the FuncDecls. I wanted to filter the ast to only function declarations without methods. I was wondering if there is a way to distinguish between normal functions and structure methods. I'm sure there must be a way since the godoc distinguishes them but don't know if they had to implement it in a certain way.
Currently my code uses AST's inspect function and traverses the tree. Example, ```Go ast.Inspect(syntaxtTree, func(n *ast.Node) bool { ... switch x := n.(type) { case *ast.FuncDecl: ... } ``` If anyone knows a way to distinguish these, please do let me know. Thanks! -- 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/76e77f0c-b7db-4ec6-b86a-f329d0b90654n%40googlegroups.com.