MCPcopy
hub / github.com/go-chi/chi / Group

Method Group

mux.go:262–268  ·  view source on GitHub ↗

Group creates a new inline-Mux with a copy of middleware stack. It's useful for a group of handlers along the same routing path that use an additional set of middlewares. See _examples/.

(fn func(r Router))

Source from the content-addressed store, hash-verified

260// for a group of handlers along the same routing path that use an additional
261// set of middlewares. See _examples/.
262func (mx *Mux) Group(fn func(r Router)) Router {
263 im := mx.With()
264 if fn != nil {
265 fn(im)
266 }
267 return im
268}
269
270// Route creates a new Mux and mounts it along the `pattern` as a subrouter.
271// Effectively, this is a short-hand call to Mount. See _examples/.

Callers 1

bigMuxFunction · 0.95

Calls 1

WithMethod · 0.95

Tested by 1

bigMuxFunction · 0.76