uninstaller

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 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

Overview

Package uninstaller performs a complete one-command uninstall of vmflow: it removes the native service, deletes the binary, and purges owned config, logs, owned certificate caches, and the self-update cache. External TLS certificate and key files referenced by config are deliberately preserved.

The flow is plan → confirm → execute. Plan probes the system and returns the ordered list of items to remove (service first, the running binary last). Confirm asks for interactive consent. Execute removes everything, tolerating already-absent paths so the command is idempotent.

Style follows internal/service and internal/updater: error-return, progress streamed to an io.Writer, no logging inside the package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(w io.Writer, r io.Reader) (bool, error)

Confirm prompts on w and reads a yes/no answer from r. Returns true only for an explicit y/yes.

func Execute

func Execute(w io.Writer, items []Item) error

Execute removes every item in order. Already-absent paths are not errors, so re-running the command is safe. The running binary is removed last.

func Print

func Print(w io.Writer, items []Item, warnings []string)

Print writes the plan (warnings + items) to w.

Types

type Item

type Item struct {
	Path string // filesystem path; empty for the service item
	Kind string // service, binary, file, directory, owned config, or stats file
	Note string // human-readable description shown in the plan
	Self bool   // marks the running binary; removed last
}

Item describes one artifact the uninstall removes.

func Plan

func Plan() (items []Item, warnings []string)

Plan probes the system and returns the ordered list of items that would be removed, plus warnings. The service is removed first and the running binary last so a still-supervised daemon is gone before its executable is deleted.

Jump to

Keyboard shortcuts

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