Alerting: fix SCC-S1017 linting issue in codebase (#47683)

pull/47817/head
Armand Grillet 3 years ago committed by GitHub
parent 508cc58a63
commit adbe374754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      pkg/services/alerting/notifiers/hipchat.go

@ -55,9 +55,7 @@ const (
// for the HipChatNotifier
func NewHipChatNotifier(model *models.AlertNotification, _ alerting.GetDecryptedValueFn, ns notifications.Service) (alerting.Notifier, error) {
url := model.Settings.Get("url").MustString()
if strings.HasSuffix(url, "/") {
url = url[:len(url)-1]
}
url = strings.TrimSuffix(url, "/")
if url == "" {
return nil, alerting.ValidationError{Reason: "Could not find url property in settings"}
}

Loading…
Cancel
Save