# README
Astrav
Summary
An AST traversal library to check Go code structure. It wraps Go's ast library and provides a parent - child structure and a lot of convenience functions like searching nodes by name, or ast type within another node. Also searching in the call tree is supported which follows function calls.
# Packages
No description provided by the author
# Functions
DefaultFilterGoPackages returns the default filter function for Go packages.
NewFile creates a new file from file path.
NewFileNode creates a new file node including raw content for regex searches.
NewFolder creates a new folder with given path.
NewModule creates an analyzer for an entire module or application.
NewNode creates a new node.
NewRawFile creates a new RawFile.
Parse calls ParseFile for all files with names ending in ".go" in the http.FileSystem specified by path and returns a map of package name -> package AST with all the packages found.
# Constants
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
Nodetype contants.
# Structs
ArrayType wraps ast.ArrayType.
AssignStmt wraps ast.AssignStmt.
BadDecl wraps ast.BadDecl.
BadExpr wraps ast.BadExpr.
BadStmt wraps ast.BadStmt.
BasicLit wraps ast.BasicLit.
BinaryExpr wraps ast.BinaryExpr.
BlockStmt wraps ast.BlockStmt.
BranchStmt wraps ast.BranchStmt.
CallExpr wraps ast.CallExpr.
CaseClause wraps ast.CaseClause.
ChanType wraps ast.ChanType.
CommClause wraps ast.CommClause.
Comment wraps ast.Comment.
CommentGroup wraps ast.CommentGroup.
CompositeLit wraps ast.CompositeLit.
DeclStmt wraps ast.DeclStmt.
DeferStmt wraps ast.DeferStmt.
Ellipsis wraps ast.Ellipsis.
EmptyStmt wraps ast.EmptyStmt.
ExprStmt wraps ast.ExprStmt.
Field wraps ast.Field.
FieldList wraps ast.FieldList.
File wraps ast.File.
Folder represents a go package folder.
ForStmt wraps ast.ForStmt.
FuncDecl wraps ast.FuncDecl.
FuncLit wraps ast.FuncLit.
FuncType wraps ast.FuncType.
GenDecl wraps ast.GenDecl.
GoStmt wraps ast.GoStmt.
Ident wraps ast.Ident.
IfStmt wraps ast.IfStmt.
ImportSpec wraps ast.ImportSpec.
IncDecStmt wraps ast.IncDecStmt.
IndexExpr wraps ast.IndexExpr.
InterfaceType wraps ast.InterfaceType.
KeyValueExpr wraps ast.KeyValueExpr.
LabeledStmt wraps ast.LabeledStmt.
MapType wraps ast.MapType.
Module represents a Go module or an application.
Package wraps ast.Package.
ParenExpr wraps ast.ParenExpr.
RangeStmt wraps ast.RangeStmt.
RawFile is based on token.File to add the source code of the file.
ReturnStmt wraps ast.ReturnStmt.
SelectorExpr wraps ast.SelectorExpr.
SelectStmt wraps ast.SelectStmt.
SendStmt wraps ast.SendStmt.
SliceExpr wraps ast.SliceExpr.
StarExpr wraps ast.StarExpr.
StructType wraps ast.StructType.
SwitchStmt wraps ast.SwitchStmt.
TypeAssertExpr wraps ast.TypeAssertExpr.
TypeSpec wraps ast.TypeSpec.
TypeSwitchStmt wraps ast.TypeSwitchStmt.
UnaryExpr wraps ast.UnaryExpr.
ValueSpec wraps ast.ValueSpec.
# Interfaces
Identifier defines a node element with an ident attached to it or ident itself.
Named provides an interface for nodes with a name.
Node wraps a ast.Node with helpful traversal functions.
Token provides an interface for nodes with a token.Token.
ValueTyper provides an interface for nodes with a value type.
# Type aliases
NodeType defines a node type string to search for type.