util

package
v0.0.2-301223-e6c85bf Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAborted = errors.New("aborted")

Functions

func Confirm

func Confirm(out io.Writer, in io.Reader, prompt string) error

Confirm asks for user confirmation using prompt. Accepted answers are 'Y', 'y', 'N', 'n'. Returns nil on 'Y'/'y' or ErrAborted on 'N'/'n'.

func Confirmf

func Confirmf(out io.Writer, in io.Reader, format string, a ...any) error

Confirmf is a printf-like version of Confirm.

Types

This section is empty.

Jump to

Keyboard shortcuts

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