// Use appends the specified handlers to the router and shares them with all routes.
770093
func (r *Router) Use(handlers ...Handler) {
	r.RouteGroup.Use(handlers...)
	r.notFoundHandlers = combineHandlers(r.handlers, r.notFound)
}
36354
func Use(handler http.Handler, middleware ...func(http.Handler) http.Handler) http.Handler {
	for _, m := range middleware {
		handler = m(handler)
	}
	return handler
}
1366741
func (m *methods) Put(path string, fn handler) *Route {
	return m.add(path, fn, PUT)
}
743346
func Use(c context.Context, out io.Writer) context.Context {
	return logging.SetFactory(c, GetFactory(out))
}
1151616
func (lc *LoggerConfig) Use(c context.Context) context.Context {
	return logging.SetFactory(c, lc.NewLogger)
}
860084
func (nap *NapNap) Use(mHandler MiddlewareHandler) {
	nap.handlers = append(nap.handlers, mHandler)
	nap.middleware = build(nap.handlers)
}
1019008
func (p *Prometheus) Use(e *gin.Engine) {
	e.Use(p.HandlerFunc())
	p.SetMetricsPath(e)
}
1070006
func (r *Router) Handle(method, pattern string, handler http.Handler) Route {
	var p string
	if pattern == "/" && r.pattern != "" {
		p = r.pattern
	} else {
		p = r.pattern + pattern
	}

	built := r.buildMiddlewares(handler)

	rm := r.root().hostrm.Register(r.host)
	rt := rm.Register(method, p, built)

	// If this route does not exist in this Router instance then add it
	if _, ok := r.findRoute(rt); !ok {
		rt.pattern = p
		rt.host = r.host
		rt.pathMatcher = rm
		r.routes = append(r.routes, rt)
	}
	return rt
}
918284
func NewUsageHandler() *UsageHandler {
	h := &UsageHandler{
		Router: NewRouter(),
		Logger: zap.NewNop(),
	}

	h.HandlerFunc("GET", "/api/v2/usage", h.handleGetUsage)
	return h
}
1345212
func (s *Server) Use(m Middleware) {
	s.middlewares = append(s.middlewares, m)
}
227644
func (db *DB) Use(name string) *Col {
	db.schemaLock.RLock()
	defer db.schemaLock.RUnlock()
	if col, exists := db.cols[name]; exists {
		return col
	}
	return nil
}
502637
func (c *Configure) Use(checkers ...Checker) {
	c.stack = append(c.stack, checkers...)
}
373795
func (r *Route) Put(handler http.Handler) *Route {
	r.handlers[http.MethodPut] = handler
	return r
}
388515
func (m *Mux) Use(p plugin.Plugin) *Mux {
	m.Middleware.Use(p)
	return m
}
669761
func (rtr *Router) Use(f func(http.ResponseWriter, *http.Request, http.HandlerFunc)) {
	srv := rtr.serveHandler
	rtr.serveHandler = func(rw http.ResponseWriter, req *http.Request) {
		f(rw, req, srv)
	}
}
782751
func Use(c context.Context) context.Context {
	lock := sync.Mutex{}
	data := []LogEntry{}
	return logging.SetFactory(c, func(ic context.Context) logging.Logger {
		return &MemLogger{&lock, &data, logging.GetFields(ic)}
	})
}
1040302
func (rg *RouteGroup) Use(handlers ...Handler) {
	rg.handlers = append(rg.handlers, handlers...)
}