Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(options ...Options) gear.Middleware
New creates a middleware to return X-Request-ID header
package main import ( "github.com/teambition/gear" "github.com/teambition/gear/middleware/requestid" ) func main() { app := gear.New() app.Use(requestid.New()) app.Use(func(ctx *gear.Context) error { return ctx.HTML(200, "<h1>Hello, Gear!</h1>") }) app.Error(app.Listen(":3000")) }
Types ¶
Click to show internal directories.
Click to hide internal directories.