command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: GPL-3.0 Imports: 10 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 {
	Config   config.Config
	Out, Err io.Writer
	In       io.ReadCloser
}

func (*Cli) MachineClient

func (c *Cli) MachineClient(machine string) (*MachineClient, error)

MachineClient provides a client to interact with a machine

type MachineClient

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

func (*MachineClient) Close

func (c *MachineClient) Close() error

func (*MachineClient) Command

func (c *MachineClient) Command(name string, args ...string) *remote.Cmd

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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