prompt

package
v0.0.0-...-db482a6 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakePromptNo

type FakePromptNo struct{}

Mock Prompt that always returns false

func NewFakePromptNo

func NewFakePromptNo() *FakePromptNo

func (FakePromptNo) AskConfirm

func (f FakePromptNo) AskConfirm(_ string) bool

type FakePromptYes

type FakePromptYes struct{}

Mock Prompt that always returns true

func NewFakePromptYes

func NewFakePromptYes() *FakePromptYes

func (FakePromptYes) AskConfirm

func (f FakePromptYes) AskConfirm(_ string) bool

type Prompt

type Prompt interface {
	AskConfirm(string) bool
}

type RealPrompt

type RealPrompt struct{}

func NewRealPrompt

func NewRealPrompt() *RealPrompt

NewRealPrompt is the factory builder for RealPrompt

func (*RealPrompt) AskConfirm

func (r *RealPrompt) AskConfirm(confirm string) bool

AskConfirm will use promptui to provide a confirmation

Jump to

Keyboard shortcuts

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