MCPcopy
hub / github.com/gofiber/fiber / URI

Method URI

bind.go:364–374  ·  view source on GitHub ↗

URI binds the route parameters into the struct, map[string]string and map[string][]string. Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode).

(out any)

Source from the content-addressed store, hash-verified

362// URI binds the route parameters into the struct, map[string]string and map[string][]string.
363// Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode).
364func (b *Bind) URI(out any) error {
365 bind := binder.GetFromThePool[*binder.URIBinding](&binder.URIBinderPool)
366
367 defer releasePooledBinder(&binder.URIBinderPool, bind)
368
369 if err := b.returnBindErr(bind.Bind(b.ctx.Route().Params, b.ctx.Params, out), BindSourceURI); err != nil {
370 return err
371 }
372
373 return b.validateStruct(out)
374}
375
376// MsgPack binds the body string into the struct.
377// Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode).

Calls 5

returnBindErrMethod · 0.95
validateStructMethod · 0.95
releasePooledBinderFunction · 0.85
BindMethod · 0.65
RouteMethod · 0.65