cleanup

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

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