From 1c03524ca85e40836fad1e969c97f51c7dbc7119 Mon Sep 17 00:00:00 2001 From: TwiN Date: Sun, 12 Jun 2022 14:18:18 -0400 Subject: [PATCH] chore(alerting): Order types alphabetically --- alerting/config.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/alerting/config.go b/alerting/config.go index a59047ec..564497db 100644 --- a/alerting/config.go +++ b/alerting/config.go @@ -65,12 +65,6 @@ func (config Config) GetAlertingProviderByAlertType(alertType alert.Type) provid return nil } return config.Custom - case alert.TypeGoogleChat: - if config.GoogleChat == nil { - // Since we're returning an interface, we need to explicitly return nil, even if the provider itself is nil - return nil - } - return config.GoogleChat case alert.TypeDiscord: if config.Discord == nil { // Since we're returning an interface, we need to explicitly return nil, even if the provider itself is nil @@ -83,6 +77,12 @@ func (config Config) GetAlertingProviderByAlertType(alertType alert.Type) provid return nil } return config.Email + case alert.TypeGoogleChat: + if config.GoogleChat == nil { + // Since we're returning an interface, we need to explicitly return nil, even if the provider itself is nil + return nil + } + return config.GoogleChat case alert.TypeMattermost: if config.Mattermost == nil { // Since we're returning an interface, we need to explicitly return nil, even if the provider itself is nil