MCPcopy
hub / github.com/gin-gonic/gin / Bind

Method Bind

binding/header.go:19–25  ·  view source on GitHub ↗
(req *http.Request, obj any)

Source from the content-addressed store, hash-verified

17}
18
19func (headerBinding) Bind(req *http.Request, obj any) error {
20 if err := mapHeader(obj, req.Header); err != nil {
21 return err
22 }
23
24 return validate(obj)
25}
26
27func mapHeader(ptr any, h map[string][]string) error {
28 return mappingByPtr(ptr, headerSource(h), "header")

Callers

nothing calls this directly

Calls 2

mapHeaderFunction · 0.85
validateFunction · 0.70

Tested by

no test coverage detected