package middleware import ( "fmt" "github.com/gin-gonic/gin" ) func CheckLogin() gin.HandlerFunc { return func(ctx *gin.Context) { fmt.Println("登录验证中间件") // 前置中间件 ctx.Next() } }