tools: golang.org/x/tools/go/analysis/passes/internal/analysisutil Index | Files

package analysisutil

import "golang.org/x/tools/go/analysis/passes/internal/analysisutil"

Package analysisutil defines various helper functions used by two or more packages beneath go/analysis.

Index

Package Files

util.go

func Format Uses

func Format(fset *token.FileSet, x ast.Expr) string

Format returns a string representation of the expression.

func HasSideEffects Uses

func HasSideEffects(info *types.Info, e ast.Expr) bool

HasSideEffects reports whether evaluation of e has side effects.

func LineStart Uses

func LineStart(f *token.File, line int) token.Pos

LineStart returns the position of the start of the specified line within file f, or NoPos if there is no line of that number.

func ReadFile Uses

func ReadFile(fset *token.FileSet, filename string) ([]byte, *token.File, error)

ReadFile reads a file and adds it to the FileSet so that we can report errors against it using lineStart.

func Unparen Uses

func Unparen(e ast.Expr) ast.Expr

Unparen returns e with any enclosing parentheses stripped.

Package analysisutil imports 6 packages (graph) and is imported by 20 packages. Updated 2019-09-21. Refresh now. Tools for package owners.