color

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 SetupColors added in v1.5.0

func SetupColors(out io.Writer, defaultColor int, forceColors bool)

SetupColors enables/disables coloured output.

Types

type Color

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

Color can be used to format text so it can be printed to the terminal in color.

func (Color) Fprintf

func (c Color) Fprintf(out io.Writer, format string, a ...interface{})

Fprintf outputs the result to out.

func (Color) Fprintln

func (c Color) Fprintln(out io.Writer, a ...interface{})

Fprintln outputs the result to out, followed by a newline.

Jump to

Keyboard shortcuts

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