confirm

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package confirm implements the interactive yes/no confirmation prompt used before destructive CLI operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prompt

func Prompt(w io.Writer, r io.Reader, prompt string) (bool, error)

Prompt writes prompt to w, then reads a single line from r and reports whether the answer was an affirmative "y" or "yes" (case-insensitive, surrounding whitespace trimmed). Any other answer — including empty input from a bare Enter press — is treated as "no", matching the conventional "y/N" default-to-no prompt style.

Types

This section is empty.

Jump to

Keyboard shortcuts

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