iostreams

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: MIT Imports: 17 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvColorDisabled added in v1.0.0

func EnvColorDisabled() bool

func EnvColorForced added in v1.0.0

func EnvColorForced() bool

func Is256ColorSupported added in v1.0.0

func Is256ColorSupported() bool

Types

type ColorScheme added in v1.0.0

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

func NewColorScheme added in v1.0.0

func NewColorScheme(enabled, is256enabled bool) *ColorScheme

func (*ColorScheme) Blue added in v1.0.0

func (c *ColorScheme) Blue(t string) string

func (*ColorScheme) Bluef added in v1.8.0

func (c *ColorScheme) Bluef(t string, args ...interface{}) string

func (*ColorScheme) Bold added in v1.0.0

func (c *ColorScheme) Bold(t string) string

func (*ColorScheme) Boldf added in v1.8.0

func (c *ColorScheme) Boldf(t string, args ...interface{}) string

func (*ColorScheme) ColorFromString added in v1.2.1

func (c *ColorScheme) ColorFromString(s string) func(string) string

func (*ColorScheme) Cyan added in v1.0.0

func (c *ColorScheme) Cyan(t string) string

func (*ColorScheme) CyanBold added in v1.4.0

func (c *ColorScheme) CyanBold(t string) string

func (*ColorScheme) Cyanf added in v1.8.0

func (c *ColorScheme) Cyanf(t string, args ...interface{}) string

func (*ColorScheme) FailureIcon added in v1.3.0

func (c *ColorScheme) FailureIcon() string

func (*ColorScheme) FailureIconWithColor added in v1.8.0

func (c *ColorScheme) FailureIconWithColor(colo func(string) string) string

func (*ColorScheme) Gray added in v1.0.0

func (c *ColorScheme) Gray(t string) string

func (*ColorScheme) Grayf added in v1.8.0

func (c *ColorScheme) Grayf(t string, args ...interface{}) string

func (*ColorScheme) Green added in v1.0.0

func (c *ColorScheme) Green(t string) string

func (*ColorScheme) Greenf added in v1.8.0

func (c *ColorScheme) Greenf(t string, args ...interface{}) string

func (*ColorScheme) HexToRGB added in v1.13.0

func (c *ColorScheme) HexToRGB(hex string, x string) string

func (*ColorScheme) Magenta added in v1.0.0

func (c *ColorScheme) Magenta(t string) string

func (*ColorScheme) Magentaf added in v1.8.0

func (c *ColorScheme) Magentaf(t string, args ...interface{}) string

func (*ColorScheme) Red added in v1.0.0

func (c *ColorScheme) Red(t string) string

func (*ColorScheme) Redf added in v1.8.0

func (c *ColorScheme) Redf(t string, args ...interface{}) string

func (*ColorScheme) SuccessIcon added in v1.0.0

func (c *ColorScheme) SuccessIcon() string

func (*ColorScheme) SuccessIconWithColor added in v1.6.0

func (c *ColorScheme) SuccessIconWithColor(colo func(string) string) string

func (*ColorScheme) WarningIcon added in v1.0.0

func (c *ColorScheme) WarningIcon() string

func (*ColorScheme) Yellow added in v1.0.0

func (c *ColorScheme) Yellow(t string) string

func (*ColorScheme) Yellowf added in v1.8.0

func (c *ColorScheme) Yellowf(t string, args ...interface{}) string

type IOStreams

type IOStreams struct {
	In     io.ReadCloser
	Out    io.Writer
	ErrOut io.Writer

	TempFileOverride *os.File
	// contains filtered or unexported fields
}

func System

func System() *IOStreams

func Test

func Test() (*IOStreams, *bytes.Buffer, *bytes.Buffer, *bytes.Buffer)

func (*IOStreams) CanPrompt added in v1.0.0

func (s *IOStreams) CanPrompt() bool

func (*IOStreams) ColorEnabled

func (s *IOStreams) ColorEnabled() bool

func (*IOStreams) ColorScheme added in v1.0.0

func (s *IOStreams) ColorScheme() *ColorScheme

func (*IOStreams) ColorSupport256 added in v1.0.0

func (s *IOStreams) ColorSupport256() bool

func (*IOStreams) DetectTerminalTheme added in v1.1.0

func (s *IOStreams) DetectTerminalTheme() string

func (*IOStreams) EnableVirtualTerminalProcessing added in v1.9.0

func (s *IOStreams) EnableVirtualTerminalProcessing()

func (*IOStreams) GetNeverPrompt added in v1.12.0

func (s *IOStreams) GetNeverPrompt() bool

func (*IOStreams) GetPager added in v1.12.0

func (s *IOStreams) GetPager() string

func (*IOStreams) IsStderrTTY added in v0.11.1

func (s *IOStreams) IsStderrTTY() bool

func (*IOStreams) IsStdinTTY added in v0.11.1

func (s *IOStreams) IsStdinTTY() bool

func (*IOStreams) IsStdoutTTY added in v0.11.1

func (s *IOStreams) IsStdoutTTY() bool

func (*IOStreams) ReadUserFile added in v1.3.0

func (s *IOStreams) ReadUserFile(fn string) ([]byte, error)

func (*IOStreams) SetNeverPrompt added in v1.0.0

func (s *IOStreams) SetNeverPrompt(v bool)

func (*IOStreams) SetPager added in v1.0.0

func (s *IOStreams) SetPager(cmd string)

func (*IOStreams) SetStderrTTY added in v0.11.1

func (s *IOStreams) SetStderrTTY(isTTY bool)

func (*IOStreams) SetStdinTTY added in v0.11.1

func (s *IOStreams) SetStdinTTY(isTTY bool)

func (*IOStreams) SetStdoutTTY added in v0.11.1

func (s *IOStreams) SetStdoutTTY(isTTY bool)

func (*IOStreams) StartPager added in v1.0.0

func (s *IOStreams) StartPager() error

func (*IOStreams) StartProgressIndicator added in v1.0.0

func (s *IOStreams) StartProgressIndicator()

func (*IOStreams) StopPager added in v1.0.0

func (s *IOStreams) StopPager()

func (*IOStreams) StopProgressIndicator added in v1.0.0

func (s *IOStreams) StopProgressIndicator()

func (*IOStreams) TempFile added in v1.3.0

func (s *IOStreams) TempFile(dir, pattern string) (*os.File, error)

func (*IOStreams) TerminalTheme added in v1.1.0

func (s *IOStreams) TerminalTheme() string

func (*IOStreams) TerminalWidth added in v0.12.0

func (s *IOStreams) TerminalWidth() int

Jump to

Keyboard shortcuts

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