fs: re-implement CutoffMode, LogLevel, TerminalColorMode with Enum

This almost 100% backwards compatible. The only difference being that
in the rc options/get output CutoffMode, LogLevel, TerminalColorMode
will be output as strings instead of integers. This is a lot more
convenient for the user. They still accept integer inputs though so
the fallout from this should be minimal.
This commit is contained in:
Nick Craig-Wood
2023-10-03 15:14:24 +01:00
parent 60a6ef914c
commit 3092f82dcc
8 changed files with 53 additions and 145 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ func TestCutoffModeString(t *testing.T) {
}{
{CutoffModeHard, "HARD"},
{CutoffModeSoft, "SOFT"},
{99, "CutoffMode(99)"},
{99, "Unknown(99)"},
} {
cm := test.in
got := cm.String()