Use sensible defaults.

This commit is contained in:
Benjamin A. Shelton 2026-10-23 09:07:39 -06:00
commit 80ab4b4476
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -127,7 +127,32 @@ func (c *Settings) Marshal() ([]byte, error) {
}
func LoadSettings(name string, fs vfs.VFS) (*Settings, error) {
conf := &Settings{}
conf := &Settings{
API: &API{},
Chat: &Chat{
Channels: make([]int64, 0),
},
DailyScripture: &DailyScripture{
UserSubmitted: false,
Schedule: "0 8 * * *",
},
System: &System{
TimeZone: "UTC",
DSN: "",
Logging: &Logging{
Level: "info",
},
},
Service: &Service{
BotToken: "",
Method: "polling",
Webhook: &Webhook{
URI: "",
Port: 0,
Host: "localhost",
},
},
}
file, err := fs.Open(name)
if err != nil {
return nil, err