S SmartDocs
シリーズ: Go go 18 行 · 更新日 2026-04-18

health.go

Go/payment-gateway-challenge/internal/handlers/health.go

package handlers

import (
	"net/http"

	"github.com/labstack/echo/v4"
)

// Ping godoc
// @Summary      Liveness probe
// @Description  Returns plain text `pong` for load balancers and smoke tests.
// @Tags         system
// @Produce      text/plain
// @Success      200  {string}  string  "pong"
// @Router       /ping [get]
func Ping(c echo.Context) error {
	return c.String(http.StatusOK, "pong")
}

関連記事