analyze

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer interface {
	Name() string // "stats", "merkle", "decode" — drives TUI labels and CLI flag names
	Run(ctx context.Context, root *node.Node, opts Options) error
}

Analyzer is implemented by every annotation lens. Each lens walks the node tree and stamps its findings as Annotations. Implementations must be safe to call concurrently with other Analyzers.

type Options

type Options struct {
	RunStats  bool
	RunMerkle bool
	RunDecode bool
}

Options carries all per-run configuration for annotation lenses.

type Suite

type Suite struct {
	// contains filtered or unexported fields
}

Suite holds a set of analyzers and runs them concurrently.

func Build

func Build(opts Options, all []Analyzer) *Suite

Build constructs a Suite from Options, adding only the enabled analyzers. Lenses are registered here; adding a new lens means adding one line.

func NewSuite

func NewSuite(analyzers ...Analyzer) *Suite

NewSuite creates a Suite from the given analyzers.

func (*Suite) Run

func (s *Suite) Run(ctx context.Context, root *node.Node, opts Options) error

Run executes all analyzers concurrently and waits for all to finish. Each analyzer writes only its own annotation keys, so concurrent writes are safe.

Jump to

Keyboard shortcuts

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