aboutsummaryrefslogtreecommitdiffstats
path: root/ansicolor_string.go
blob: b8111669d5b6b915b6e738011c69d33b7c34be60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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) + ")"
	}
}