Documentation ¶
Index ¶
- Constants
- Variables
- func ColorForState(state string) string
- func Paint(color Color, value string) string
- func PaintForState(text, state string) string
- func ShortNodeName(s string) string
- func SliceContains(s []string, str string) bool
- func SliceMergeDeduplicate(s, s2 []string) []string
- func StringsReplaceReversed(s, old, new string, n int) string
- func UUIDToShortUUID(uuid string) string
- type Color
Constants ¶
View Source
const ( ResetText Color = "\x1b[0000m" BrightText = "\x1b[0001m" RedText = "\x1b[0031m" GreenText = "\x1b[0032m" YellowText = "\x1b[0033m" BlueText = "\x1b[0034m" MagentaText = "\x1b[0035m" CyanText = "\x1b[0036m" WhiteText = "\x1b[0037m" DefaultText = "\x1b[0039m" BrightRedText = "\x1b[1;31m" BrightGreenText = "\x1b[1;32m" BrightYellowText = "\x1b[1;33m" BrightBlueText = "\x1b[1;34m" BrightMagentaText = "\x1b[1;35m" BrightCyanText = "\x1b[1;36m" BrightWhiteText = "\x1b[1;37m" )
Color codes interpretted by the terminal NOTE: all codes must be of the same length or they will throw off the field alignment of tabwriter
Variables ¶
View Source
var SkipColor bool
Functions ¶
func ColorForState ¶
func PaintForState ¶
func ShortNodeName ¶ added in v1.1.1
ShortNodeName helps reducing the node name when it is the default value (node hostname) It only keeps the top-level domain
func SliceContains ¶
func SliceMergeDeduplicate ¶
func StringsReplaceReversed ¶
StringsReplaceReversed is similar to strings.Replace, but replacing the right-most elements instead of left-most
func UUIDToShortUUID ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.