cli

package
v0.0.0-...-6665b4f Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: GPL-2.0-or-later Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInput

func GetInput() chan rune

func UseStdin

func UseStdin()

Types

type CLI

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

CLI represents an command line interface instance.

func Spawn

func Spawn(target string) CLI

Spawn starts a new instance of the target.

func (CLI) Interrupt

func (c CLI) Interrupt()

func (CLI) Query

func (c CLI) Query(cmd string) (string, bool)

Query executes cmd and returns the output.

func (CLI) QueryInteractive

func (c CLI) QueryInteractive(cmd string, interaction string) (string, bool)

func (CLI) Quit

func (c CLI) Quit()

func (CLI) ReadCommand

func (c CLI) ReadCommand() (string, bool)

ReadCommand waits for the next command token and returns it.

func (CLI) ReadOutput

func (c CLI) ReadOutput() (string, bool, bool)

ReadOutput waits for the next output token and returns it.

Jump to

Keyboard shortcuts

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