// Wrap sets the connection on the RequestLogger and returns itself
967912
func (logger *RequestLogger) Wrap(innerconnection router.Connection) router.Connection {
	logger.connection = innerconnection
	return logger
}
410437
func Wrap(ctx context.Context, constructor alice.Constructor) alice.Constructor {
	return func(next http.Handler) (http.Handler, error) {
		if constructor == nil {
			return nil, nil
		}
		handler, err := constructor(next)
		if err != nil {
			return nil, err
		}

		if tracableHandler, ok := handler.(Tracable); ok {
			name, spanKind := tracableHandler.GetTracingInformation()
			log.FromContext(ctx).WithField(log.MiddlewareName, name).Debug("Adding tracing to middleware")
			return NewWrapper(handler, name, spanKind), nil
		}
		return handler, nil
	}
}
164402
func Wrap(err error, message string) error {
	return errs.Wrap(err, message)
}
69221
func RequestLoggerHandler(c *gin.Context) {
	if c.Request != nil {

		buf, _ := ioutil.ReadAll(c.Request.Body)
		c.Request.Body.Close()

		log.Println("-----------------------------------------------------------------------------------------------------")
		log.Println("REQUEST HEADERS:")
		for k, v := range c.Request.Header {
			log.Printf("\t%s: %s\n", k, v)
		}
		log.Printf("\nREQUEST BODY:\n%s\n", buf)
		log.Println("-----------------------------------------------------------------------------------------------------")

		c.Request.Body = ioutil.NopCloser(bytes.NewReader(buf))
	}
	c.Next()
}
81803
func (b *Buffer) Wrap(next http.Handler) error {
	b.next = next
	return nil
}
850140
func (c *Client) Wrap(f func()) (err interface{}) {
	defer func() {
		err = recover()
		switch val := err.(type) {
		case nil:
			return
		case error:
			if c.configuration.checkIgnore(val.Error()) {
				return
			}
			c.ErrorWithStackSkip(CRIT, val, 2)
		default:
			str := fmt.Sprint(val)
			if c.configuration.checkIgnore(str) {
				return
			}
			errValue := errors.New(str)
			c.ErrorWithStackSkip(CRIT, errValue, 2)
		}
	}()

	f()
	return
}
645907
func (retry *RetryRequest) Wrap(innerconnection plugin.Connection) plugin.Connection {
	retry.connection = innerconnection
	return retry
}
1293368
func (m *Module) wrap(h Handle) httprouter.Handle {
	return func(rw http.ResponseWriter, req *http.Request, par Params) {
		err := h(rw, req, par)
		if err != nil && m.ErrorHandler != nil {
			m.ErrorHandler(rw, req, err)
		}
	}
}
1086708
func Wrap(c context.Context) context.Context {
	if _, ok := c.(*cacheContext); ok {
		return c
	}
	return &cacheContext{Context: c}
}
926492
func WrapConn(fn ConnCallback) Option {
	return func(srv *Server) error {
		srv.ConnCallback = fn
		return nil
	}
}
1209808
func wrap(cmd actionFunc) actionFunc {
	return func(ctx *cli.Context) error {
		return errs.ToError(cmd(ctx))
	}
}
1148212
func Wrap(err error, code string, message string) error {
	if err == nil {
		return nil
	}
	err = errors.Wrap(err, message)
	return argoerr{code, message, err.(stackTracer)}
}
1255618
func Wrap(handler Handler) gin.HandlerFunc {
	return func(c *gin.Context) {
		inj, exist := Get(c)
		if !exist {
			c.AbortWithError(http.StatusServiceUnavailable, ErrorInjectorNotFound.New(nil))
			return
		}

		if _, err := injectutil.Invoke(inj, handler); err != nil {
			c.AbortWithError(http.StatusNotFound, err)
		}
	}
}
95554
func (retry *RetryRequest) Wrap(innerconnection cloudcontroller.Connection) cloudcontroller.Connection {
	retry.connection = innerconnection
	return retry
}
773731
func Wrap(err error, message string) error {
	return &error2{
		Inner:    err,
		Location: locate(2),
		Message:  message,
	}
}
2653
func Wrap(path string, cfg Configuration) Wrapper {
	w := &wrapper{
		cfg:  cfg,
		path: path,
		mut:  sync.NewMutex(),
	}
	return w
}
33114
func (l *Limiter) WrapHandle(h http.Handler) {
	l.rateLimiter.Wrap(h)
	l.ConnLimiter.Wrap(l.rateLimiter)
}