package main import ( "fmt" "time" "github.com/aisk/vox" ) func timeit(ctx *vox.Context, next func()) { t := time.Now() next() fmt.Println("time usage:", time.Now().Sub(t)) } func main() { app := vox.New() app.Use(func(ctx *vox.Context, next func()) { ctx.Response.Body = "我艹" ctx.Response.Status = 201 ctx.Response.Headers.Set("fuck", "ya!") }) app.Run(":3000") }