utils

package
v2.14.6 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prompt

type Prompt struct {
	// contains filtered or unexported fields
}

func NewPrompt

func NewPrompt(promptsEnabled bool) *Prompt

func (*Prompt) Confirm

func (p *Prompt) Confirm(message string) bool

func (*Prompt) ConfirmAll

func (p *Prompt) ConfirmAll(message string) (bool, bool)

ConfirmAll asks the user to confirm an action. If prompts are disabled, it will return true. support y/n and A, which means all return if confirm and if all

func (*Prompt) ConfirmBaseOnCount

func (p *Prompt) ConfirmBaseOnCount(messageForSingle string, messageForArray string, count int) (bool, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳