mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-10 16:42:26 +08:00
refactor: refactor eiblog
This commit is contained in:
24
cmd/backup/handler/ping/ping.go
Normal file
24
cmd/backup/handler/ping/ping.go
Normal file
@@ -0,0 +1,24 @@
|
||||
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")
|
||||
}
|
||||
Reference in New Issue
Block a user