~xenrox/ntfy-alertmanager

549793cb83f840cff755550e011c8c1c653f41e1 — Thorben Günther 1 year, 4 months ago 9f12f78
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
1 files changed, 1 insertions(+), 3 deletions(-)

M config.go
M config.go => config.go +1 -3
@@ 85,9 85,7 @@ func readConfig(path string) (*config, error) {

		labels := make(map[string]labelConfig)
		for _, labelName := range config.labels.Order {
			labelDir := labelsDir.Children.Get(labelName)

			if labelDir != nil {
			for _, labelDir := range labelsDir.Children.GetAll(labelName) {
				labelConfig := new(labelConfig)
				var name string