analyzer

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirSize

func DirSize(dir string) int64

DirSize calculates total size of all files under dir recursively. Skips entries that return permission errors.

func Domains

func Domains() []string

Domains returns all registered domain names

func FileAge

func FileAge(path string) int

FileAge returns the age in days based on modification time. Returns 0 if the file doesn't exist.

func MakeResult

func MakeResult(domain string, items []core.CleanableItem, totalSize int64, summary string) core.AnalysisResult

MakeResult is a convenience factory for building AnalysisResult

func Register

func Register(a Analyzer)

Register adds an analyzer to the global registry

Types

type Analyzer

type Analyzer interface {
	Domain() string
	Risk() core.RiskLevel
	Analyze() (core.AnalysisResult, error)
}

Analyzer is the interface all domain analyzers implement

func All

func All() []Analyzer

All returns all registered analyzers

func ByDomain

func ByDomain(domain string) Analyzer

ByDomain returns the analyzer for a specific domain, or nil

type AppSupportAnalyzer

type AppSupportAnalyzer struct{}

func (*AppSupportAnalyzer) Analyze

func (a *AppSupportAnalyzer) Analyze() (core.AnalysisResult, error)

func (*AppSupportAnalyzer) Domain

func (a *AppSupportAnalyzer) Domain() string

func (*AppSupportAnalyzer) Risk

func (a *AppSupportAnalyzer) Risk() core.RiskLevel

type BrowserAnalyzer

type BrowserAnalyzer struct{}

func (*BrowserAnalyzer) Analyze

func (b *BrowserAnalyzer) Analyze() (core.AnalysisResult, error)

func (*BrowserAnalyzer) Domain

func (b *BrowserAnalyzer) Domain() string

func (*BrowserAnalyzer) Risk

func (b *BrowserAnalyzer) Risk() core.RiskLevel

type DevCachesAnalyzer

type DevCachesAnalyzer struct{}

func (*DevCachesAnalyzer) Analyze

func (d *DevCachesAnalyzer) Analyze() (core.AnalysisResult, error)

func (*DevCachesAnalyzer) Domain

func (d *DevCachesAnalyzer) Domain() string

func (*DevCachesAnalyzer) Risk

func (d *DevCachesAnalyzer) Risk() core.RiskLevel

type DiskAnalyzer

type DiskAnalyzer struct{}

func (*DiskAnalyzer) Analyze

func (d *DiskAnalyzer) Analyze() (core.AnalysisResult, error)

func (*DiskAnalyzer) Domain

func (d *DiskAnalyzer) Domain() string

func (*DiskAnalyzer) Risk

func (d *DiskAnalyzer) Risk() core.RiskLevel

type DockerAnalyzer

type DockerAnalyzer struct{}

func (*DockerAnalyzer) Analyze

func (d *DockerAnalyzer) Analyze() (core.AnalysisResult, error)

func (*DockerAnalyzer) Domain

func (d *DockerAnalyzer) Domain() string

func (*DockerAnalyzer) Risk

func (d *DockerAnalyzer) Risk() core.RiskLevel

type DownloadsAnalyzer

type DownloadsAnalyzer struct{}

func (*DownloadsAnalyzer) Analyze

func (d *DownloadsAnalyzer) Analyze() (core.AnalysisResult, error)

func (*DownloadsAnalyzer) Domain

func (d *DownloadsAnalyzer) Domain() string

func (*DownloadsAnalyzer) Risk

func (d *DownloadsAnalyzer) Risk() core.RiskLevel

type LogsAnalyzer

type LogsAnalyzer struct{}

func (*LogsAnalyzer) Analyze

func (l *LogsAnalyzer) Analyze() (core.AnalysisResult, error)

func (*LogsAnalyzer) Domain

func (l *LogsAnalyzer) Domain() string

func (*LogsAnalyzer) Risk

func (l *LogsAnalyzer) Risk() core.RiskLevel

type OllamaAnalyzer

type OllamaAnalyzer struct{}

func (*OllamaAnalyzer) Analyze

func (o *OllamaAnalyzer) Analyze() (core.AnalysisResult, error)

func (*OllamaAnalyzer) Domain

func (o *OllamaAnalyzer) Domain() string

func (*OllamaAnalyzer) Risk

func (o *OllamaAnalyzer) Risk() core.RiskLevel

type ReposAnalyzer

type ReposAnalyzer struct{}

func (*ReposAnalyzer) Analyze

func (r *ReposAnalyzer) Analyze() (core.AnalysisResult, error)

Analyze scans the configured repo roots for prunable build-artifact directories (node_modules, .venv, ...). It runs in two phases so a large number of targets does not saturate the analyzer timeout:

  1. A cheap tree walk collects target paths without measuring their size and never descends into a target (so nested targets are never double-counted).
  2. Target sizes are measured concurrently with a bounded worker pool, because measuring 1000+ targets sequentially is what previously exceeded the global timeout.

func (*ReposAnalyzer) Domain

func (r *ReposAnalyzer) Domain() string

func (*ReposAnalyzer) Risk

func (r *ReposAnalyzer) Risk() core.RiskLevel

type TrashAnalyzer

type TrashAnalyzer struct{}

func (*TrashAnalyzer) Analyze

func (t *TrashAnalyzer) Analyze() (core.AnalysisResult, error)

func (*TrashAnalyzer) Domain

func (t *TrashAnalyzer) Domain() string

func (*TrashAnalyzer) Risk

func (t *TrashAnalyzer) Risk() core.RiskLevel

type XcodeAnalyzer

type XcodeAnalyzer struct{}

func (*XcodeAnalyzer) Analyze

func (x *XcodeAnalyzer) Analyze() (core.AnalysisResult, error)

func (*XcodeAnalyzer) Domain

func (x *XcodeAnalyzer) Domain() string

func (*XcodeAnalyzer) Risk

func (x *XcodeAnalyzer) Risk() core.RiskLevel

Jump to

Keyboard shortcuts

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