term

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTerminal

func IsTerminal(i interface{}) bool

Types

type Handler

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

func Chain

func Chain(handler *Handler, notify ...func()) *Handler

func New

func New(final func(os.Signal), notify ...func()) *Handler

func (*Handler) Close

func (h *Handler) Close()

func (*Handler) Run

func (h *Handler) Run(fn func() error) error

func (*Handler) Signal

func (h *Handler) Signal(s os.Signal)

type SafeFunc

type SafeFunc func() error

type TTY

type TTY struct {
	In     io.Reader
	Out    io.Writer
	Raw    bool
	TryDev bool
	Parent *Handler
}

func (TTY) IsTerminalIn

func (t TTY) IsTerminalIn() bool

func (TTY) IsTerminalOut

func (t TTY) IsTerminalOut() bool

func (TTY) Safe

func (t TTY) Safe(fn SafeFunc) error

Jump to

Keyboard shortcuts

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