From 821fc8c3d95b562f0a0d938068c77be54624e495 Mon Sep 17 00:00:00 2001 From: GnomeZworc Date: Mon, 1 Apr 2024 19:29:29 +0200 Subject: [PATCH] v1.2.0: lib: add health lib Signed-off-by: GnomeZworc --- lib/health/isHealth.go | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/health/isHealth.go diff --git a/lib/health/isHealth.go b/lib/health/isHealth.go new file mode 100644 index 0000000..7cac15c --- /dev/null +++ b/lib/health/isHealth.go @@ -0,0 +1,10 @@ +package health + +import "github.com/labstack/echo/v4" + +func IsHealth(c echo.Context) bool { + if c.Request().Method == "GET" && c.Path() == "/health" { + return true + } + return false +}