config: add support for "list" type

"list" is a list of strings, represented in the .ini as repeated entries
for a field, e.g.
url = myurl1
url = myurl2
Shown in the UI as multiple inputs with delete buttons.
This commit is contained in:
Harvey Tindall
2024-08-20 20:19:32 +01:00
parent b2771e6cc5
commit 6bad293f74
6 changed files with 169 additions and 40 deletions
+1 -1
View File
@@ -232,7 +232,7 @@ func start(asDaemon, firstCall bool) {
app.err.Fatalf(lm.FailedCopyConfig, app.configPath, err)
}
app.info.Printf(lm.CopyConfig, app.configPath)
tempConfig, _ := ini.Load(app.configPath)
tempConfig, _ := ini.ShadowLoad(app.configPath)
tempConfig.Section("").Key("first_run").SetValue("true")
tempConfig.SaveTo(app.configPath)
}