confirm

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package confirm provides confirmation prompts for destructive operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prompter

type Prompter struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

Prompter handles confirmation prompts.

func (*Prompter) Confirm

func (p *Prompter) Confirm(message string, skipConfirm bool) (bool, error)

Confirm displays a confirmation prompt and returns true if the user confirms. If skipConfirm is true, returns true without prompting.

func (*Prompter) ConfirmAction

func (p *Prompter) ConfirmAction(action, target string, skipConfirm bool) (bool, error)

ConfirmAction is a convenience function for confirming an action.

func (*Prompter) ConfirmDelete

func (p *Prompter) ConfirmDelete(target string, skipConfirm bool) (bool, error)

ConfirmDelete confirms a delete operation with a warning.

Jump to

Keyboard shortcuts

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