Skip to content

Commit

Permalink
Add config.ParseDisplaynametemplate method
Browse files Browse the repository at this point in the history
This makes it possible to create and modify the config instance in
another project.
  • Loading branch information
Fizzadar committed Oct 23, 2024
1 parent 905f9ff commit ab296ce
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/connector/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@ func (c *Config) UnmarshalYAML(node *yaml.Node) error {
if err != nil {
return err
}
return c.ParseDisplaynametemplate()
}

func (c *Config) ParseDisplaynametemplate() 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) {
Expand Down

0 comments on commit ab296ce

Please sign in to comment.