console

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager handles console interactions

func NewManager

func NewManager(reader io.Reader, writer io.Writer) *Manager

NewManager creates a new console manager

func (*Manager) Confirm

func (m *Manager) Confirm(ctx context.Context, message string) (bool, error)

Confirm asks for user confirmation and returns true for 'y', false for 'n'

func (*Manager) ConfirmWithDefault

func (m *Manager) ConfirmWithDefault(ctx context.Context, message string, defaultValue bool) (bool, error)

ConfirmWithDefault asks for user confirmation with a default value Returns defaultValue if user just presses enter

Jump to

Keyboard shortcuts

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