Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CleanCmd = &cobra.Command{
	Use:   "clean [providers...]",
	Short: "Clean caches to free disk space",
	Long: `Clean caches for specified providers or all enabled providers with --all flag.

By default, runs full clean using native tool commands (e.g., 'go clean -cache').
Use --smart for LRU-based cleaning that removes old files until cache reaches max_size.`,
	RunE: runClean,
}

CleanCmd cleans caches to free disk space.

View Source
var ConfigCmd = &cobra.Command{
	Use:   "config",
	Short: "Manage configuration",
}

ConfigCmd manages configuration.

View Source
var InteractiveCmd = &cobra.Command{
	Use:     "interactive",
	Aliases: []string{"i"},
	Short:   "Interactive cache management mode",
	RunE:    runInteractive,
}

InteractiveCmd launches interactive TUI mode.

View Source
var StatusCmd = &cobra.Command{
	Use:   "status",
	Short: "Show cache status for all providers",
	RunE:  runStatus,
}

StatusCmd shows cache status for all enabled providers.

Functions

func RunInteractiveWithLoader

func RunInteractiveWithLoader(loader *config.Loader, dryRun, smart bool) error

RunInteractiveWithLoader launches interactive mode with specified loader.

Types

type ProviderStatus

type ProviderStatus struct {
	Name       string `json:"name"`
	CurrentFmt string `json:"current"`
	MaxFmt     string `json:"max"`
	Error      string `json:"error,omitempty"`
	Current    int64  `json:"current_bytes"`
	Max        int64  `json:"max_bytes"`
	OverLimit  bool   `json:"over_limit"`
}

ProviderStatus holds scan result for a single provider.

type StatusOutput

type StatusOutput struct {
	Total      string           `json:"total"`
	Providers  []ProviderStatus `json:"providers"`
	TotalBytes int64            `json:"total_bytes"`
}

StatusOutput holds full status output for JSON serialization.

Jump to

Keyboard shortcuts

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