github.com/johnnyeven/libtools@v0.0.0-20191126065708-61829c1adf46/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  }