query.go — fiber Source File
Architecture documentation for query.go, a go file in the fiber codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 4cb6d1f2_2308_3f12_7931_9fe626aa0b1c["query.go"] baa5866c_7884_3b82_5e75_ef5c8f224470["v2"] 4cb6d1f2_2308_3f12_7931_9fe626aa0b1c --> baa5866c_7884_3b82_5e75_ef5c8f224470 style 4cb6d1f2_2308_3f12_7931_9fe626aa0b1c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
package binder
import (
"github.com/gofiber/utils/v2"
"github.com/valyala/fasthttp"
)
// QueryBinding is the query binder for query request body.
type QueryBinding struct {
EnableSplitting bool
}
// Name returns the binding name.
func (*QueryBinding) Name() string {
return "query"
}
// Bind parses the request query and returns the result.
func (b *QueryBinding) Bind(reqCtx *fasthttp.Request, out any) error {
data := make(map[string][]string)
for key, val := range reqCtx.URI().QueryArgs().All() {
k := utils.UnsafeString(key)
v := utils.UnsafeString(val)
if err := formatBindData(b.Name(), out, data, k, v, b.EnableSplitting, true); err != nil {
return err
}
}
return parse(b.Name(), out, data)
}
// Reset resets the QueryBinding binder.
func (b *QueryBinding) Reset() {
b.EnableSplitting = false
}
Types
Dependencies
- v2
Source
Frequently Asked Questions
What does query.go do?
query.go is a source file in the fiber codebase, written in go.
What does query.go depend on?
query.go imports 1 module(s): v2.
Where is query.go in the architecture?
query.go is located at binder/query.go (directory: binder).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free