2022-12-06 12:07:06 +00:00
|
|
|
package fs
|
|
|
|
|
|
|
|
// TerminalColorMode describes how ANSI codes should be handled
|
2023-09-27 14:31:47 +00:00
|
|
|
type TerminalColorMode = Enum[terminalColorModeChoices]
|
2022-12-06 12:07:06 +00:00
|
|
|
|
|
|
|
// TerminalColorMode constants
|
|
|
|
const (
|
|
|
|
TerminalColorModeAuto TerminalColorMode = iota
|
|
|
|
TerminalColorModeNever
|
|
|
|
TerminalColorModeAlways
|
|
|
|
)
|
|
|
|
|
2023-09-27 14:31:47 +00:00
|
|
|
type terminalColorModeChoices struct{}
|
2022-12-06 12:07:06 +00:00
|
|
|
|
2023-09-27 14:31:47 +00:00
|
|
|
func (terminalColorModeChoices) Choices() []string {
|
|
|
|
return []string{
|
|
|
|
TerminalColorModeAuto: "AUTO",
|
|
|
|
TerminalColorModeNever: "NEVER",
|
|
|
|
TerminalColorModeAlways: "ALWAYS",
|
2022-12-06 12:07:06 +00:00
|
|
|
}
|
|
|
|
}
|