mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-19 15:30:17 +00:00
parent
e20ec090b2
commit
a483044557
1 changed files with 1 additions and 1 deletions
|
@ -90,13 +90,13 @@ func templateAnnotations(annotations map[string]string, data AlertTplData, funcs
|
||||||
eg := new(utils.ErrGroup)
|
eg := new(utils.ErrGroup)
|
||||||
r := make(map[string]string, len(annotations))
|
r := make(map[string]string, len(annotations))
|
||||||
for key, text := range annotations {
|
for key, text := range annotations {
|
||||||
r[key] = text
|
|
||||||
buf.Reset()
|
buf.Reset()
|
||||||
builder.Reset()
|
builder.Reset()
|
||||||
builder.Grow(len(tplHeader) + len(text))
|
builder.Grow(len(tplHeader) + len(text))
|
||||||
builder.WriteString(tplHeader)
|
builder.WriteString(tplHeader)
|
||||||
builder.WriteString(text)
|
builder.WriteString(text)
|
||||||
if err := templateAnnotation(&buf, builder.String(), data, funcs); err != nil {
|
if err := templateAnnotation(&buf, builder.String(), data, funcs); err != nil {
|
||||||
|
r[key] = text
|
||||||
eg.Add(fmt.Errorf("key %q, template %q: %w", key, text, err))
|
eg.Add(fmt.Errorf("key %q, template %q: %w", key, text, err))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue