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

Method Query

bind.go:287–298  ·  view source on GitHub ↗

Query binds the query string 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

285// Query binds the query string into the struct, map[string]string and map[string][]string.
286// Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode).
287func (b *Bind) Query(out any) error {
288 bind := binder.GetFromThePool[*binder.QueryBinding](&binder.QueryBinderPool)
289 bind.EnableSplitting = b.ctx.App().config.EnableSplittingOnParsers
290
291 defer releasePooledBinder(&binder.QueryBinderPool, bind)
292
293 if err := b.returnBindErr(bind.Bind(&b.ctx.RequestCtx().Request, out), BindSourceQuery); err != nil {
294 return err
295 }
296
297 return b.validateStruct(out)
298}
299
300// JSON binds the body string into the struct.
301// Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode).

Callers

nothing calls this directly

Calls 6

returnBindErrMethod · 0.95
validateStructMethod · 0.95
releasePooledBinderFunction · 0.85
AppMethod · 0.65
BindMethod · 0.65
RequestCtxMethod · 0.65

Tested by

no test coverage detected