LCOV - code coverage report
Current view: top level - adapter/http/controller - sample_handler.go Coverage Total Hit
Test: coverage.lcov Lines: 100.0 % 9 9
Test Date: 2026-04-14 06:42:22 Functions: - 0 0

            Line data    Source code
       1              : // Package controller はエンドポイント処理を担当します。
       2              : package controller
       3              : 
       4              : import (
       5              :         "log/slog"
       6              :         "net/http"
       7              : 
       8              :         "github.com/gin-gonic/gin"
       9              : )
      10              : 
      11              : // SampleHandler はサンプルのハンドラです
      12              : type SampleHandler struct{}
      13              : 
      14              : // NewSampleHandler は SampleHandler の新しいインスタンスを生成して返します
      15              : // サンプルのHTTPリクエストを処理するためのハンドラを初期化染ます
      16            2 : func NewSampleHandler() *SampleHandler { return &SampleHandler{} }
      17              : 
      18              : // Ping は サンプルメッセージを返します。
      19            1 : func (h SampleHandler) Ping(c *gin.Context) {
      20            1 :         slog.Debug("GetPing called")
      21            1 :         // logger := slog.FromContext(c.Request.Context())
      22            1 : 
      23            1 :         c.JSON(http.StatusOK, gin.H{
      24            1 :                 "message": "sample pong",
      25            1 :         })
      26            1 : }
        

Generated by: LCOV version 2.3.1-1