INNER CODE UNIT · Go
func
GoAdminGroup/go-admin · context/context.go:663
func (g *RouterGroup) AppendReqAndResp(url, method string, handler []Handler) {
g.app.Requests = append(g.app.Requests, Path{
URL: join(g.Prefix, url),
Method: method,
})
g.app.routeIndex++
var h = make([]Handler, len(g.Middlewares))
copy(h, g.Middlewares)
g.app.Handlers[Path{
URL: join(g.Prefix, url),
Method: method,
}] = append(h, handler...)
}
// POST is a shortcut for app.AppendReqAndResp(url, "post", handler).