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

Method Bind

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

Source from the content-addressed store, hash-verified

16}
17
18func (plainBinding) Bind(req *http.Request, obj any) error {
19 all, err := io.ReadAll(req.Body)
20 if err != nil {
21 return err
22 }
23
24 return decodePlain(all, obj)
25}
26
27func (plainBinding) BindBody(body []byte, obj any) error {
28 return decodePlain(body, obj)

Callers

nothing calls this directly

Calls 1

decodePlainFunction · 0.85

Tested by

no test coverage detected