cli

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debug(...interface{}) error
	Info(...interface{}) error
	Warn(...interface{}) error
	Error(...interface{}) error
}

Logger is the interface for the logger struct

type LoggerUI

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

LoggerUI is a CLI UI for logging outputs

func NewLoggerUI

func NewLoggerUI(logger Logger) *LoggerUI

NewLoggerUI creates new CLI UI which uses a logger for printing outputs

func (*LoggerUI) Ask

func (u *LoggerUI) Ask(query string) (string, error)

Ask implements cli.Ui Ask method

func (*LoggerUI) AskSecret

func (u *LoggerUI) AskSecret(query string) (string, error)

AskSecret implements cli.Ui AskSecret method

func (*LoggerUI) Error

func (u *LoggerUI) Error(message string)

Error implements cli.Ui Error method

func (*LoggerUI) Info

func (u *LoggerUI) Info(message string)

Info implements cli.Ui Info method

func (*LoggerUI) Output

func (u *LoggerUI) Output(message string)

Output implements cli.Ui Output method

func (*LoggerUI) Warn

func (u *LoggerUI) Warn(message string)

Warn implements cli.Ui Warn method

type UI

type UI struct {
	cli.Ui
}

UI is a CLI UI

func NewUI

func NewUI() *UI

NewUI creates a new CLI UI

func (*UI) Colored

func (u *UI) Colored() *UI

Colored creates a new UI with colored outputs

func (*UI) Concurrent

func (u *UI) Concurrent() *UI

Concurrent creates a new UI which is safe to be used by multiple goroutines

Jump to

Keyboard shortcuts

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