summaryrefslogtreecommitdiff
path: root/config/config.go
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-11-10 20:27:30 +0100
committerReto Brunner <reto@labrat.space>2020-11-14 15:40:13 +0100
commit20ec2c8eeb2e071f28358814935a0f56672a9f49 (patch)
tree501b43a39a4152872bb6f08221da9c37fc75559c /config/config.go
parent3ad3a5ede07c1248ae8176bdc19a623731c64056 (diff)
downloadaerc-20ec2c8eeb2e071f28358814935a0f56672a9f49.zip
compose: use a proper header instead of a string map
Prior to this commit, the composer was based on a map[string]string. While this approach was very versatile, it lead to a constant encoding / decoding of addresses and other headers. This commit switches to a different model, where the composer is based on a header. Commands which want to interact with it can simply set some defaults they would like to have. Users can overwrite them however they like. In order to get access to the functions generating / getting the msgid go-message was upgraded.
Diffstat (limited to 'config/config.go')
-rw-r--r--config/config.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go
index 87d183a..51982d2 100644
--- a/config/config.go
+++ b/config/config.go
@@ -413,8 +413,10 @@ func (config *AercConfig) LoadConfig(file *ini.File) error {
if key == "template-dirs" {
continue
}
+ // we want to fail during startup if the templates are not ok
+ // hence we do a dummy execute here
_, err := templates.ParseTemplateFromFile(
- val, config.Templates.TemplateDirs, templates.TestTemplateData())
+ val, config.Templates.TemplateDirs, templates.DummyData())
if err != nil {
return err
}