mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-04 13:52:26 +08:00
25 lines
418 B
Go
25 lines
418 B
Go
package ping
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// RegisterRoutes register routes
|
|
func RegisterRoutes(group gin.IRoutes) {
|
|
group.GET("/ping", handlePing)
|
|
}
|
|
|
|
// handlePing ping
|
|
// @Summary ping
|
|
// @Description ping
|
|
// @Tags ping
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Success 200 {string} string "it's ok"
|
|
// @Router /ping [get]
|
|
func handlePing(c *gin.Context) {
|
|
c.String(http.StatusOK, "it's ok")
|
|
}
|