summaryrefslogtreecommitdiff
path: root/internal/client/config/config.go
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2025-02-10 18:24:40 +0200
committerKyren223 <Kyren223@proton.me>2025-02-10 18:24:40 +0200
commit75228d04d07544f14a25fd21715090f13abcdb95 (patch)
tree485ca38b00503ee85c5168a803322422a6b387bb /internal/client/config/config.go
parent9da5aa5be455f007e149484f11f5f0f399d503ca (diff)
Fixed issue where colors would save to config when they were empty json
array rather than null, now both [] and null are not saved
Diffstat (limited to 'internal/client/config/config.go')
-rw-r--r--internal/client/config/config.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/internal/client/config/config.go b/internal/client/config/config.go
index aadde87..c3264c5 100644
--- a/internal/client/config/config.go
+++ b/internal/client/config/config.go
@@ -21,22 +21,13 @@ type Config struct {
}
func Default() Config {
- colors.Save()
- cols := colors.Get()
- sColors := make([]string, 0, colors.Count)
- for _, color := range cols {
- if color != "" {
- sColors = append(sColors, colors.ToHex(color))
- }
- }
-
return Config{
ServerName: "eko.kyren.codes",
PrivateKeyPath: "",
InsertModeTabToSpace: true,
InsertModeSpacesPerTab: 4,
InsecureDebugMode: false,
- Colors: sColors,
+ Colors: nil,
}
}
@@ -59,6 +50,7 @@ func VerifyAndFix(config *Config) error {
)
}
+ colors.LoadStrings(config.Colors)
}
return nil