Add config.PostProcess method

This makes it possible to create and modify the config instance in
another project.
This commit is contained in:
Nick Mills-Barrett 2024-10-23 14:42:14 +01:00
parent 905f9ff976
commit b821d83eee
No known key found for this signature in database
GPG key ID: 31F23F2CF354937B

View file

@ -75,12 +75,13 @@ func (c *Config) UnmarshalYAML(node *yaml.Node) error {
if err != nil {
return err
}
return c.PostProcess()
}
func (c *Config) PostProcess() error {
var err error
c.displaynameTemplate, err = template.New("displayname").Parse(c.DisplaynameTemplate)
if err != nil {
return err
}
return nil
return err
}
func upgradeConfig(helper up.Helper) {