From 6d28a0608c602e1b6f5929fd581960d7b83d65a9 Mon Sep 17 00:00:00 2001 From: Hopertz Date: Mon, 9 Sep 2024 14:04:42 +0300 Subject: [PATCH] add current time on ping handler --- cmd/api/ping.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/api/ping.go b/cmd/api/ping.go index 032e12e..3c7ae0f 100644 --- a/cmd/api/ping.go +++ b/cmd/api/ping.go @@ -2,6 +2,7 @@ package main import ( "net/http" + "time" "github.com/labstack/echo/v4" ) @@ -12,6 +13,7 @@ func (app *application) pingHandler(c echo.Context) error { "status": "available", "environment": app.config.ENV, "version": version, + "current_time": time.Now().Format(time.RFC3339), } return c.JSON(http.StatusOK, ping)