Documentation
¶
Overview ¶
Package cleanup provides file and directory removal with safety re-checks. It continues on individual errors and returns a structured summary of the cleanup operation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanupResult ¶
type CleanupResult struct {
// Removed is the number of items successfully removed.
Removed int
// Failed is the number of items that failed removal.
Failed int
// BytesFreed is the total size in bytes of successfully removed items.
BytesFreed int64
// Errors holds individual error details for failed items.
Errors []error
}
CleanupResult summarises the outcome of a cleanup operation.
func Execute ¶
func Execute(results []scan.CategoryResult) CleanupResult
Execute removes all entries from the given scan results. Each path is re-checked against the safety blocklist before deletion. Pseudo-paths (e.g. "docker:...") are skipped. Errors on individual items do not abort the overall operation.
Click to show internal directories.
Click to hide internal directories.