Skip to content

Commit

Permalink
refactor: StringsJoin in template
Browse files Browse the repository at this point in the history
  • Loading branch information
vknabel committed Apr 18, 2024
1 parent 9d6768a commit 96cbc32
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/nftables/nftables.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ table inet nat {
type ipv4_addr
flags interval
auto-merge
elements = {
{{- $sep := " " }}
{{- range .AdditionalDNSAddrs }}{{ $sep }}{{ . }}{{ $sep = ", " }}
{{- end }} }
elements = { {{ StringsJoin .AdditionalDNSAddrs ", " }} }
}
}
{{- end }}

0 comments on commit 96cbc32

Please sign in to comment.