feat: custom label shorthands
This commit is contained in:
parent
88b935ca03
commit
ab705876e1
8 changed files with 144 additions and 16 deletions
|
|
@ -49,8 +49,15 @@ func (p *Provider) Init() error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("error while parsing default rule: %w", err)
|
||||
}
|
||||
|
||||
p.defaultRuleTpl = defaultRuleTpl
|
||||
|
||||
for _, item := range p.LabelMap {
|
||||
toTpl, err := provider.MakeAnyTemplate(item.From, item.To, nil)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error while parsing label %v: %w", item.To, err)
|
||||
}
|
||||
item.toTpl = toTpl
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue