Documentation ¶
Index ¶
- func ArrayTypeEqual(a, b *ast.ArrayType) error
- func AssignStmtEqual(a, b *ast.AssignStmt) error
- func BasicLitEqual(a, b *ast.BasicLit) error
- func BinaryExprEqual(a, b *ast.BinaryExpr) error
- func BlockStmtEqual(a, b *ast.BlockStmt) error
- func CallExprEqual(a, b *ast.CallExpr) error
- func CompositeLitEqual(a, b *ast.CompositeLit) error
- func DeclStmtEqual(a, b *ast.DeclStmt) error
- func ExprSliceEqual(a, b []ast.Expr) error
- func FieldListEqual(a, b *ast.FieldList) error
- func FieldListToMap(fl *ast.FieldList) (map[string]Field, error)
- func FuncDeclEqual(a, b *ast.FuncDecl) error
- func FuncTypeEqual(a, b *ast.FuncType) error
- func GenDeclEqual(a, b *ast.GenDecl) error
- func IdentEqual(a, b *ast.Ident) error
- func IfStmtEqual(a, b *ast.IfStmt) error
- func IndexExprEqual(a, b *ast.IndexExpr) error
- func InterfaceEqual(a, b *ast.InterfaceType) error
- func KeyValueExprEqual(a, b *ast.KeyValueExpr) error
- func LoadAstFile(file string) (*ast.File, error)
- func NodeEqual(a, b ast.Node) error
- func RangeStmtEqual(a, b *ast.RangeStmt) error
- func RemoveDeclByName(declarations []ast.Decl, name string) []ast.Decl
- func RemoveGenDeclByName(declarations []ast.Decl, name string) []ast.Decl
- func RemoveImports(file *ast.File)
- func RenameDeclarations(node ast.Node, oldName, newName string)
- func ReturnStmtEqual(a, b *ast.ReturnStmt) error
- func SelectorExprEqual(a, b *ast.SelectorExpr) error
- func StarExprEqual(a, b *ast.StarExpr) error
- func StructEqual(a, b *ast.StructType) error
- func TypeSpecEqual(a, b *ast.TypeSpec) error
- func UnaryExprEqual(a, b *ast.UnaryExpr) error
- func ValueEqual(a, b *ast.ValueSpec) error
- func WriteAstFile(file string, ast *ast.File) error
- type ErrAdditionalFields
- type Field
- type Merger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayTypeEqual ¶
func AssignStmtEqual ¶
func AssignStmtEqual(a, b *ast.AssignStmt) error
func BasicLitEqual ¶
func BinaryExprEqual ¶
func BinaryExprEqual(a, b *ast.BinaryExpr) error
func BlockStmtEqual ¶
func CallExprEqual ¶
func CompositeLitEqual ¶
func CompositeLitEqual(a, b *ast.CompositeLit) error
func DeclStmtEqual ¶
func ExprSliceEqual ¶
func FieldListEqual ¶
func FuncDeclEqual ¶
func FuncTypeEqual ¶
func GenDeclEqual ¶
func IdentEqual ¶
func IfStmtEqual ¶
func IndexExprEqual ¶
func InterfaceEqual ¶
func InterfaceEqual(a, b *ast.InterfaceType) error
func KeyValueExprEqual ¶
func KeyValueExprEqual(a, b *ast.KeyValueExpr) error
func NodeEqual ¶
NodeEqual checks whether two nodes represent the same thing. If the are not the same, the first found mismatch will be reported. Comments and positions are ignored.
func RangeStmtEqual ¶
func RemoveDeclByName ¶
RemoveDeclByName removes a declaration by its name
func RemoveGenDeclByName ¶
RemoveGenDeclByName removes a const, var or type by its declaration name. References which use the declared thing are unchanged.
func RemoveImports ¶
func RenameDeclarations ¶
RenameDeclarations renames all occurrences of a declaration and their usage.
func ReturnStmtEqual ¶
func ReturnStmtEqual(a, b *ast.ReturnStmt) error
func SelectorExprEqual ¶
func SelectorExprEqual(a, b *ast.SelectorExpr) error
func StarExprEqual ¶
func StructEqual ¶
func StructEqual(a, b *ast.StructType) error
func TypeSpecEqual ¶
func UnaryExprEqual ¶
func ValueEqual ¶
Types ¶
type ErrAdditionalFields ¶
ErrAdditionalFields if a field list has additional fields
func (ErrAdditionalFields) Error ¶
func (e ErrAdditionalFields) Error() string
type Field ¶
func (Field) ToAstField ¶
Click to show internal directories.
Click to hide internal directories.