Add public functions

Fix a large number of bugs
Optimize the description information
This commit is contained in:
2025-10-27 21:06:41 +08:00
parent edff1bb839
commit 3990ec01c6
23 changed files with 5332 additions and 192 deletions

View File

@@ -98,7 +98,7 @@ func createHTTPServer(addr string) *http.Server {
// 创建Gin引擎
router := gin.New()
// 添加恢复中间件
router.Use(gin.Recovery())
@@ -176,11 +176,11 @@ func startServer(server *http.Server) {
func configureGin() {
// 禁用Gin的颜色输出提高控制台兼容性
gin.DisableConsoleColor()
// 设置Gin的输出为丢弃因为我们使用自定义日志中间件
gin.DefaultWriter = io.Discard
gin.DefaultErrorWriter = io.Discard
// 根据配置设置Gin模式
if viper.GetString("app.mode") == "production" {
gin.SetMode(gin.ReleaseMode)