build: 初始化构建后端并集成Gin框架,开放健康检查端口

This commit is contained in:
2026-05-23 12:16:34 +08:00
parent 6151d983b6
commit 6801072671
6 changed files with 212 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package model
type Response struct {
Code int `json:"code"`
Message string `json:"message"`
Data any `json:"data,omitempty"`
}
func OK(data any) Response {
return Response{Code: 0, Message: "ok", Data: data}
}
func Fail(code int, msg string) Response {
return Response{Code: code, Message: msg}
}