confirm

package
v6.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const UserDenied = "user denied confirmation"

Variables

This section is empty.

Functions

func FAsk

func FAsk(in io.Reader, s string, overrides ...bool) bool

FAsk asks the user for confirmation using the current strategy or the default behavior if no strategy is set.

func SetStrategy added in v6.7.4

func SetStrategy(strategy Confirmer)

SetStrategy sets the current confirmation strategy.

Types

type Confirmer added in v6.7.4

type Confirmer interface {
	Ask(in io.Reader, s string, overrides ...bool) bool
}

Confirmer is an interface for different confirmation strategies.

Jump to

Keyboard shortcuts

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