做完了一部分,备份一下,防止以外删除
This commit is contained in:
17
internal/handler/health.go
Normal file
17
internal/handler/health.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
||||
"github.com/break/junhong_cmp_fiber/pkg/response"
|
||||
)
|
||||
|
||||
// HealthCheck 健康检查处理器
|
||||
func HealthCheck(c *fiber.Ctx) error {
|
||||
return response.Success(c, fiber.Map{
|
||||
"status": "healthy",
|
||||
"timestamp": time.Now().Format(time.RFC3339),
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user