rewriter

package
v0.0.0-...-db6d164 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldInstrument

func ShouldInstrument(pkg *packages.Package, cfg *Config) bool

func ShouldSkipFile

func ShouldSkipFile(file *ast.File, filename string) bool

func ShouldSkipFunc

func ShouldSkipFunc(fn *ast.FuncDecl) bool

Types

type Config

type Config struct {
	TracerImportPath string
	IncludePatterns  []string
	ExcludePatterns  []string
	ModulePath       string
}

type Result

type Result struct {
	Files []*RewrittenFile
}

func Rewrite

func Rewrite(pkgs []*packages.Package, fset *token.FileSet, cfg *Config) (*Result, error)

type RewrittenFile

type RewrittenFile struct {
	Fset     *token.FileSet
	File     *ast.File
	Original string
}

Jump to

Keyboard shortcuts

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