书栈网 · BookStack 本次搜索耗时 0.013 秒,为您找到 54 个相关结果.
  • Routing

    Basic Routing Parameters Named Parameters Catch-All Parameters Retrieve Parameters Raw Path Options Route Name Route Middleware Basic Routing func index ( ctx * clever...
  • Minify

    Minify middleware is provided by tdewolff/minify . import ( "github.com/clevergo/clevergo" "github.com/tdewolff/minify/v2" "github.com/tdewolff/minify/v2/c...
  • 生成 URL

    命名路由 匹配路由 命名路由 命名路由用于反向路由生成。 router . Get ( "/login" , login , clevergo . RouteName ( "login" )) router . Get ( "/posts/:year/:month/:day/:slug" , queryPost , clevergo ...
  • 中間件

    創建中間件 全局中間件 路由組中間件 路由中間件 第三方中間件 創建中間件 中間件是一個接收 Handle 並返回 Handle 的函數。讓我們以 ServerHeader 作爲例子,其寫入 Server 響應頭,並調用下一個中間件或處理器。 func ServerHeader ( srv string ) clevergo ...
  • 路由組

    api := router . Group ( "/api" , clevergo . RouteGroupMiddleware ( // API 中間件,比如 CORS、身份認證、授權認證。 clevergo . WrapHH ( cors . Default (). Handler ), // https://git...
  • CSRF

    CRSF 中間件由 gorilla/csrf 提供。 import ( "github.com/clevergo/clevergo" "github.com/gorilla/csrf" ) m := csrf . Protect ( [] byte ( "32-byte-long-auth-...
  • Response

    Text HTML Render JSON JSONP XML Emit Blob Redirect SendFile Shortcuts ctx.Response equals to http.ResponseWriter . Text func text ( ctx * clevergo . Context ) ...
  • Quick Start

    Installation Example Installation go get github . com / clevergo / clevergo Example package main import ( "fmt" "net/http" "github.com/cle...
  • 快速入門

    安裝 舉個栗子 安裝 go get github . com / clevergo / clevergo 舉個栗子 package main import ( "fmt" "net/http" "github.com/clevergo/clevergo" ) fu...
  • Middleware

    Create a Middleware Global Middleware Route Group Middleware Route Middleware Third-party Middleware Create a Middleware Middleware is a function that receives a Handle an...