From b0454e1de6ff0cf310b3acb599a7d42d7a079423 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Fri, 4 Jul 2025 10:29:59 -0700 Subject: Initial commit --- ansicolor_string.go | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ansicolor_string.go (limited to 'ansicolor_string.go') diff --git a/ansicolor_string.go b/ansicolor_string.go new file mode 100644 index 0000000..b811166 --- /dev/null +++ b/ansicolor_string.go @@ -0,0 +1,40 @@ +// Code generated by "stringer -type=ansiColor -linecomment"; DO NOT EDIT. + +package main + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[black-0] + _ = x[red-1] + _ = x[green-2] + _ = x[yellow-3] + _ = x[blue-4] + _ = x[magenta-5] + _ = x[cyan-6] + _ = x[white-7] + _ = x[defaultColor-9] +} + +const ( + _ansiColor_name_0 = "blackredgreenyellowbluemagentacyanwhite" + _ansiColor_name_1 = "default" +) + +var ( + _ansiColor_index_0 = [...]uint8{0, 5, 8, 13, 19, 23, 30, 34, 39} +) + +func (i ansiColor) String() string { + switch { + case 0 <= i && i <= 7: + return _ansiColor_name_0[_ansiColor_index_0[i]:_ansiColor_index_0[i+1]] + case i == 9: + return _ansiColor_name_1 + default: + return "ansiColor(" + strconv.FormatInt(int64(i), 10) + ")" + } +} -- cgit v1.3.1