From 5c66742f5229c81a417cf7940446aa6a8f085d58 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Wed, 27 May 2020 11:08:59 -0700 Subject: [PATCH] middelware removed (#882) --- pkg/webhooks/middleware.go | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 pkg/webhooks/middleware.go diff --git a/pkg/webhooks/middleware.go b/pkg/webhooks/middleware.go deleted file mode 100644 index 4fb44ae4f8..0000000000 --- a/pkg/webhooks/middleware.go +++ /dev/null @@ -1,15 +0,0 @@ -package webhooks - -import ( - "net/http" - "time" -) - -func timeoutHandler(h http.Handler, timeout time.Duration) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var timeoutHandler http.Handler - msg := "ok" - timeoutHandler = http.TimeoutHandler(h, timeout*time.Second, msg) - timeoutHandler.ServeHTTP(w, r) - } -}