iostreams

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT 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 contains information for input/output used in the CLI.

func System

func System() *IOStreams

System returns an IOStreams object with prepared input/output.

func (*IOStreams) IsStderrTTY

func (s *IOStreams) IsStderrTTY() bool

IsStderrTTY checks if stderr is a TTY.

func (*IOStreams) IsStdinTTY

func (s *IOStreams) IsStdinTTY() bool

IsStdinTTY checks if stdin is a TTY.

func (*IOStreams) IsStdoutTTY

func (s *IOStreams) IsStdoutTTY() bool

IsStdoutTTY checks if stdout is a TTY.

func (*IOStreams) SetStderrTTY

func (s *IOStreams) SetStderrTTY(isTTY bool)

SetStderrTTY marks stderr as TTY.

func (*IOStreams) SetStdinTTY

func (s *IOStreams) SetStdinTTY(isTTY bool)

SetStdinTTY marks stdin as TTY.

func (*IOStreams) SetStdoutTTY

func (s *IOStreams) SetStdoutTTY(isTTY bool)

SetStdoutTTY marks stdout as TTY.

func (*IOStreams) StartProgressIndicator

func (s *IOStreams) StartProgressIndicator(str string)

StartProgressIndicator creates a new spinner indicator.

func (*IOStreams) StopProgressIndicator

func (s *IOStreams) StopProgressIndicator()

StopProgressIndicator stops the running spinner indicator.

Jump to

Keyboard shortcuts

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