Documentation
¶
Index ¶
- Constants
- Variables
- func GetUnderlyingWriter(out io.Writer) io.Writer
- func GetWriter(out io.Writer, defaultColor int, forceColors bool) io.Writer
- func IsColorable(out io.Writer) bool
- func IsStdout(out io.Writer) bool
- func NewColorWriter(out io.Writer) io.Writer
- func SetupColors(out io.Writer, defaultColor int, forceColors bool) io.Writer
- func WithEventContext(out io.Writer, phase constants.Phase, subtaskID, origin string) io.Writer
- type Color
Constants ¶
View Source
const DefaultColorCode = 34
Maintain compatibility with the old color coding. 34 is the code for blue.
Variables ¶
View Source
var ( // LightRed can format text to be displayed to the terminal in light red. LightRed = Color{/* contains filtered or unexported fields */} // LightGreen can format text to be displayed to the terminal in light green. LightGreen = Color{/* contains filtered or unexported fields */} // LightYellow can format text to be displayed to the terminal in light yellow. LightYellow = Color{/* contains filtered or unexported fields */} // LightBlue can format text to be displayed to the terminal in light blue. LightBlue = Color{/* contains filtered or unexported fields */} // LightPurple can format text to be displayed to the terminal in light purple. LightPurple = Color{/* contains filtered or unexported fields */} // Red can format text to be displayed to the terminal in red. Red = Color{/* contains filtered or unexported fields */} // Green can format text to be displayed to the terminal in green. Green = Color{/* contains filtered or unexported fields */} // Yellow can format text to be displayed to the terminal in yellow. Yellow = Color{/* contains filtered or unexported fields */} // Blue can format text to be displayed to the terminal in blue. Blue = Color{/* contains filtered or unexported fields */} // Purple can format text to be displayed to the terminal in purple. Purple = Color{/* contains filtered or unexported fields */} // Cyan can format text to be displayed to the terminal in cyan. Cyan = Color{/* contains filtered or unexported fields */} // White can format text to be displayed to the terminal in white. White = Color{/* contains filtered or unexported fields */} // None uses ANSI escape codes to reset all formatting. None = Color{} // Default default output color for output from Skaffold to the user Default = Blue )
Functions ¶
func GetUnderlyingWriter ¶ added in v1.26.0
GetUnderlyingWriter returns the underlying writer if out is a colorableWriter
func IsColorable ¶
func SetupColors ¶
SetupColors conditionally wraps the input `Writer` with a color enabled `Writer`.
func WithEventContext ¶ added in v1.26.0
WithEventContext will return a new skaffoldWriter with the given parameters to be used for the event writer. If the passed io.Writer is not a skaffoldWriter, then it is simply returned.
Types ¶
Click to show internal directories.
Click to hide internal directories.