iostreams

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOStreams

type IOStreams struct {
	In     io.ReadCloser
	Out    io.Writer
	ErrOut io.Writer
	// contains filtered or unexported fields
}

IOStreams is a type which defines the streams for the program

func System

func System() *IOStreams

System creates an IOStreams using the standard system streams

func (*IOStreams) CanPrompt

func (s *IOStreams) CanPrompt() bool

CanPrompt detects if the input is a TTY

func (*IOStreams) IsSSHSession

func (s *IOStreams) IsSSHSession() bool

func (*IOStreams) IsStderrTTY

func (s *IOStreams) IsStderrTTY() bool

func (*IOStreams) IsStdinTTY

func (s *IOStreams) IsStdinTTY() bool

func (*IOStreams) IsStdoutTTY

func (s *IOStreams) IsStdoutTTY() bool

func (*IOStreams) NewSpinner added in v0.27.0

func (s *IOStreams) NewSpinner() *spinner.Spinner

NewSpinner returns a new spinner progress bar to be used in synchronous commands

func (*IOStreams) SetStderrTTY

func (s *IOStreams) SetStderrTTY(isTTY bool)

func (*IOStreams) SetStdinTTY

func (s *IOStreams) SetStdinTTY(isTTY bool)

func (*IOStreams) SetStdoutTTY

func (s *IOStreams) SetStdoutTTY(isTTY bool)

Jump to

Keyboard shortcuts

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