Use the gin framework

This commit is contained in:
2025-10-26 14:48:02 +08:00
parent 9e0eb1497b
commit d844403505
29 changed files with 1612 additions and 1858 deletions

View File

@@ -1,13 +1,14 @@
package server
import (
"net/http"
"networkDev/controllers/home"
"github.com/gin-gonic/gin"
)
// RegisterHomeRoutes 注册主页路由
// 只包含根路径,用于主页功能
func RegisterHomeRoutes(mux *http.ServeMux) {
func RegisterHomeRoutes(router *gin.Engine) {
// 根路径 - 主页
mux.HandleFunc("/", home.RootHandler)
router.GET("/", home.RootHandler)
}