Documentation ¶
Index ¶
- func Is256ColorSupported() bool
- type ColorScheme
- func (c *ColorScheme) Blue(t string) string
- func (c *ColorScheme) Bold(t string) string
- func (c *ColorScheme) ColorFromString(s string) func(string) string
- func (c *ColorScheme) Cyan(t string) string
- func (c *ColorScheme) CyanBold(t string) string
- func (c *ColorScheme) FailureIcon() string
- func (c *ColorScheme) Gray(t string) string
- func (c *ColorScheme) Green(t string) string
- func (c *ColorScheme) Magenta(t string) string
- func (c *ColorScheme) Red(t string) string
- func (c *ColorScheme) SuccessIcon() string
- func (c *ColorScheme) SuccessIconWithColor(colo func(string) string) string
- func (c *ColorScheme) WarningIcon() string
- func (c *ColorScheme) Yellow(t string) string
- type IOStreams
- func (s *IOStreams) CanPrompt() bool
- func (s *IOStreams) ColorEnabled() bool
- func (s *IOStreams) ColorScheme() *ColorScheme
- func (s *IOStreams) ColorSupport256() bool
- func (s *IOStreams) DetectTerminalTheme() string
- func (s *IOStreams) IsStderrTTY() bool
- func (s *IOStreams) IsStdinTTY() bool
- func (s *IOStreams) IsStdoutTTY() bool
- func (s *IOStreams) ProgressIndicator() *mpb.Progress
- func (s *IOStreams) ReadUserFile(fn string) ([]byte, error)
- func (s *IOStreams) SetColor(v bool)
- func (s *IOStreams) SetNeverPrompt(v bool)
- func (s *IOStreams) SetProgress(v bool)
- func (s *IOStreams) SetStderrTTY(isTTY bool)
- func (s *IOStreams) SetStdinTTY(isTTY bool)
- func (s *IOStreams) SetStdoutTTY(isTTY bool)
- func (s *IOStreams) TempFile(dir, pattern string) (*os.File, error)
- func (s *IOStreams) TerminalTheme() string
- func (s *IOStreams) TerminalWidth() int
- func (s *IOStreams) WaitForProgressIndicator()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Is256ColorSupported ¶
func Is256ColorSupported() bool
Types ¶
type ColorScheme ¶
type ColorScheme struct {
// contains filtered or unexported fields
}
func NewColorScheme ¶
func NewColorScheme(enabled, is256enabled bool) *ColorScheme
func (*ColorScheme) Blue ¶
func (c *ColorScheme) Blue(t string) string
func (*ColorScheme) Bold ¶
func (c *ColorScheme) Bold(t string) string
func (*ColorScheme) ColorFromString ¶
func (c *ColorScheme) ColorFromString(s string) func(string) string
func (*ColorScheme) Cyan ¶
func (c *ColorScheme) Cyan(t string) string
func (*ColorScheme) CyanBold ¶
func (c *ColorScheme) CyanBold(t string) string
func (*ColorScheme) FailureIcon ¶
func (c *ColorScheme) FailureIcon() string
func (*ColorScheme) Gray ¶
func (c *ColorScheme) Gray(t string) string
func (*ColorScheme) Green ¶
func (c *ColorScheme) Green(t string) string
func (*ColorScheme) Magenta ¶
func (c *ColorScheme) Magenta(t string) string
func (*ColorScheme) Red ¶
func (c *ColorScheme) Red(t string) string
func (*ColorScheme) SuccessIcon ¶
func (c *ColorScheme) SuccessIcon() string
func (*ColorScheme) SuccessIconWithColor ¶
func (c *ColorScheme) SuccessIconWithColor(colo func(string) string) string
func (*ColorScheme) WarningIcon ¶
func (c *ColorScheme) WarningIcon() string
func (*ColorScheme) Yellow ¶
func (c *ColorScheme) Yellow(t string) string
type IOStreams ¶
type IOStreams struct { In io.ReadCloser Out io.Writer ErrOut io.Writer Logger *logger.Logger TempFileOverride *os.File // contains filtered or unexported fields }
func (*IOStreams) ColorEnabled ¶
func (*IOStreams) ColorScheme ¶
func (s *IOStreams) ColorScheme() *ColorScheme
func (*IOStreams) ColorSupport256 ¶
func (*IOStreams) DetectTerminalTheme ¶
func (*IOStreams) IsStderrTTY ¶
func (*IOStreams) IsStdinTTY ¶
func (*IOStreams) IsStdoutTTY ¶
func (*IOStreams) ProgressIndicator ¶ added in v2.16.0
func (s *IOStreams) ProgressIndicator() *mpb.Progress
func (*IOStreams) SetNeverPrompt ¶
func (*IOStreams) SetProgress ¶ added in v2.16.0
func (*IOStreams) SetStderrTTY ¶
func (*IOStreams) SetStdinTTY ¶
func (*IOStreams) SetStdoutTTY ¶
func (*IOStreams) TerminalTheme ¶
func (*IOStreams) TerminalWidth ¶
func (*IOStreams) WaitForProgressIndicator ¶ added in v2.16.0
func (s *IOStreams) WaitForProgressIndicator()
Click to show internal directories.
Click to hide internal directories.