astutil

package
v1.4.1-0...-3245157 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNoopOfStatement

func CreateNoopOfStatement(pkg *types.Package, info *types.Info, stmt ast.Stmt) ast.Stmt

CreateNoopOfStatement creates a syntactically safe noop statement out of a given statement.

func CreateNoopOfStatements

func CreateNoopOfStatements(pkg *types.Package, info *types.Info, stmts []ast.Stmt) ast.Stmt

CreateNoopOfStatements creates a syntactically safe noop statement out of a given statement.

func Functions

func Functions(n ast.Node) []*ast.FuncDecl

Functions returns all found functions.

func NoopExprsInStatement

func NoopExprsInStatement(pkg *types.Package, info *types.Info, stmt ast.Stmt) []ast.Expr

NoopExprsInStatement returns a list of expressions that must be evaluated and discarded to avoid unused import errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL