Remove (almost) all the panics

This commit is contained in:
2024-03-16 21:14:46 +10:30
parent 3dec93c4f4
commit d9a979b782
4 changed files with 55 additions and 17 deletions

View File

@@ -319,7 +319,8 @@ func (cs *ConfigService) LoadConfig() error {
func (cs *ConfigService) WriteConfig() {
s, err := yaml.Marshal(cs.Config)
if err != nil {
panic(err)
log.Printf("error writing config: %s", err)
os.Exit(1)
}
path := cs.ConfigPath