From 225bf73373f0f3f8a91b74b174ec88bf44fb4679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Wed, 25 Mar 2020 22:41:51 +0000 Subject: [PATCH] fix(backend): remove empty config slice checks --- internal/config/config.go | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index b8873ff46..7d7eb23e8 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -238,41 +238,6 @@ func (config *configSchema) Read(flags *pflag.FlagSet) string { log.Fatalf("Failed to unmarshal configuration: %v", err) } - // FIXME workaround for https://github.com/mitchellh/mapstructure/issues/146 - if config.Annotations.Hidden == nil { - config.Annotations.Hidden = []string{} - } - if config.Annotations.Visible == nil { - config.Annotations.Visible = []string{} - } - if config.Annotations.Keep == nil { - config.Annotations.Keep = []string{} - } - if config.Annotations.Strip == nil { - config.Annotations.Strip = []string{} - } - if config.Labels.Keep == nil { - config.Labels.Keep = []string{} - } - if config.Labels.Strip == nil { - config.Labels.Strip = []string{} - } - if config.Labels.Color.Static == nil { - config.Labels.Color.Static = []string{} - } - if config.Labels.Color.Unique == nil { - config.Labels.Color.Unique = []string{} - } - if config.Receivers.Keep == nil { - config.Receivers.Keep = []string{} - } - if config.Receivers.Strip == nil { - config.Receivers.Strip = []string{} - } - if config.SilenceForm.Strip.Labels == nil { - config.SilenceForm.Strip.Labels = []string{} - } - if config.Authentication.Header.Name != "" && len(config.Authentication.BasicAuth.Users) > 0 { log.Fatalf("Both authentication.basicAuth.users and authentication.header.name is set, only one can be enabled") }