github.com/artisanhe/tools@v1.0.1-0.20210607022958-19a8fef2eb04/gin_app/common.go (about)

     1  package gin_app
     2  
     3  import (
     4  	"net/http"
     5  
     6  	"github.com/gin-gonic/gin"
     7  )
     8  
     9  func CheckHealth(c *gin.Context) {
    10  	c.JSON(http.StatusOK, nil)
    11  }
    12  
    13  func RegisterCommonRoutesOn(router *gin.RouterGroup) {
    14  	router.GET("", WithSwagger())
    15  	router.HEAD("", CheckHealth)
    16  }