package main
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
)
func main() {
s := g.Server()
s.BindHandler("/status/:status", func(r *ghttp.Request) {
r.Response.Write("woops, status ", r.Get("status"), " found")
})
s.BindStatusHandler(404, func(r *ghttp.Request){
r.Response.RedirectTo("/status/404")
})
s.SetPort(8199)
s.Run()
}