From 7914b025cb664db033d8dc29d9e85f1d6b0c8cb8 Mon Sep 17 00:00:00 2001 From: Alex Efros Date: Wed, 6 Jun 2018 21:22:32 +0300 Subject: [PATCH] doc(webhook): cleanup example There is no need in closing request body. From https://golang.org/pkg/net/http/#Request: // The Server will close the request body. The ServeHTTP // Handler does not need to. --- webhook/client_handler_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/webhook/client_handler_test.go b/webhook/client_handler_test.go index 5438b16509..4c5fa398df 100644 --- a/webhook/client_handler_test.go +++ b/webhook/client_handler_test.go @@ -27,7 +27,6 @@ func Example() { return } - defer req.Body.Close() fmt.Fprintf(w, "Received signed event: %v", event) }) log.Fatal(http.ListenAndServe(":8080", nil))