From af6d11fd333ec75d922df8f2ad18c449ce5c4ac8 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Mon, 20 Aug 2018 11:26:24 +0300 Subject: [PATCH] Add panic handler --- pkg/api/panic.go | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 pkg/api/panic.go diff --git a/pkg/api/panic.go b/pkg/api/panic.go new file mode 100644 index 0000000..a28d559 --- /dev/null +++ b/pkg/api/panic.go @@ -0,0 +1,10 @@ +package api + +import ( + "net/http" + +) + +func (s *Server) panicHandler(w http.ResponseWriter, r *http.Request) { + s.logger.Panic("Panic command received") +}