config: Load all label settings

Until now only the first occurrence of a label type was loaded.

Fixes: https://todo.xenrox.net/~xenrox/ntfy-alertmanager/10
This commit is contained in:
Thorben Günther 2023-01-16 00:48:11 +01:00
parent 9f12f78e9f
commit 549793cb83
No known key found for this signature in database
GPG key ID: 415CD778D8C5AFED

View file

@ -85,9 +85,7 @@ func readConfig(path string) (*config, error) {
labels := make(map[string]labelConfig) labels := make(map[string]labelConfig)
for _, labelName := range config.labels.Order { for _, labelName := range config.labels.Order {
labelDir := labelsDir.Children.Get(labelName) for _, labelDir := range labelsDir.Children.GetAll(labelName) {
if labelDir != nil {
labelConfig := new(labelConfig) labelConfig := new(labelConfig)
var name string var name string