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