command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomName

func GenerateRandomName() string

func PrintTable

func PrintTable(output io.Writer, data [][]string) error

func Prompt

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

func PromptForConfirmation

func PromptForConfirmation(in io.Reader, out io.Writer, message string) (bool, error)

PromptForConfirmation requests and checks confirmation from the user. This will display the provided message followed by ' y/N '. If the user input 'y' or 'Y' it returns true otherwise false. If no message is provided, "Are you sure you want to proceed? y/N " will be used instead.

Types

type Cli

type Cli struct {
	Out, Err *streams.Out
	In       *streams.In
}

func (*Cli) AppConfig

func (c *Cli) AppConfig() (config.Config, error)

func (*Cli) DialMachine

func (c *Cli) DialMachine() (*ssh.Client, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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