Skip to content

Commit

Permalink
fix: add missing arrow for replace
Browse files Browse the repository at this point in the history
  • Loading branch information
rkspx committed Mar 2, 2022
1 parent cc29a61 commit e55c8ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/pkg/dpluger/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ filter {
{{ if .SIDListGroup }}{{ range $i, $g := .SIDListGroup }}
if [plugin_sid] in [{{ range $idx, $rev := $g.Plugins }}{{ if $idx }}, {{ end }}"{{ $rev.SID }}"{{ end }}] {
mutate {
replace { {{ if $g.CustomData.CustomLabel1 }}
replace => { {{ if $g.CustomData.CustomLabel1 }}
"custom_label1" => "{{ $g.CustomData.CustomLabel1 }}"{{ end }}{{ if $g.CustomData.CustomData1 }}
"custom_data1" => "{{ transform $g.CustomData.CustomData1 "." }}"{{ end }}{{ if $g.CustomData.CustomLabel2 }}
"custom_label2" => "{{ $g.CustomData.CustomLabel2 }}"{{ end }}{{ if $g.CustomData.CustomData2 }}
Expand Down Expand Up @@ -263,7 +263,7 @@ filter {
{{ if .SIDListGroup }}{{ range $i, $g := .SIDListGroup }}
if [plugin_sid] in [{{ range $idx, $rev := $g.Plugins }}{{ if $idx }}, {{ end }}"{{ $rev.SID }}"{{ end }}] {
mutate {
replace { {{ if $g.CustomData.CustomLabel1 }}
replace => { {{ if $g.CustomData.CustomLabel1 }}
"custom_label1" => "{{ $g.CustomData.CustomLabel1 }}"{{ end }}{{ if $g.CustomData.CustomData1 }}
"custom_data1" => "{{ transform $g.CustomData.CustomData1 "." }}"{{ end }}{{ if $g.CustomData.CustomLabel2 }}
"custom_label2" => "{{ $g.CustomData.CustomLabel2 }}"{{ end }}{{ if $g.CustomData.CustomData2 }}
Expand Down

0 comments on commit e55c8ba

Please sign in to comment.