ui

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicUi

type BasicUi struct {
	Reader      io.Reader
	Writer      io.Writer
	ErrorWriter io.Writer
	// contains filtered or unexported fields
}

func NewBasicUi

func NewBasicUi() *BasicUi

func (*BasicUi) Ask

func (rw *BasicUi) Ask(query string) (string, error)

func (*BasicUi) Error

func (rw *BasicUi) Error(message string)

func (*BasicUi) Machine

func (rw *BasicUi) Machine(t string, args ...string)

func (*BasicUi) Message

func (rw *BasicUi) Message(message string)

func (*BasicUi) Say

func (rw *BasicUi) Say(message string)

type MockUi

type MockUi struct {
	Reader      io.Reader
	Writer      *bytes.Buffer
	ErrorWriter *bytes.Buffer
	// contains filtered or unexported fields
}

func NewMockUi

func NewMockUi() *MockUi

func (*MockUi) Ask

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

func (*MockUi) Error

func (u *MockUi) Error(message string)

func (*MockUi) Machine

func (u *MockUi) Machine(t string, args ...string)

func (*MockUi) Message

func (u *MockUi) Message(message string)

func (*MockUi) Say

func (u *MockUi) Say(message string)

type UI

type UI interface {
	Ask(string) (string, error)
	Say(string)
	Message(string)
	Error(string)
	Machine(string, ...string)
}

Jump to

Keyboard shortcuts

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