Browse Source

Use MethodGet field instead of hardcoded string literal

Co-authored-by: Moritz Johner <moolen@users.noreply.github.com>
Willem M 4 năm trước cách đây
mục cha
commit
7160cab0b8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      pkg/provider/webhook/webhook.go

+ 1 - 1
pkg/provider/webhook/webhook.go

@@ -199,7 +199,7 @@ func (w *WebHook) getWebhookData(ctx context.Context, provider *esv1alpha1.Webho
 	}
 	method := provider.Method
 	if method == "" {
-		method = "GET"
+		method = http.MethodGet
 	}
 	url, err := executeTemplateString(provider.URL, data)
 	if err != nil {