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

Method Bind

binding/form.go:41–49  ·  view source on GitHub ↗
(req *http.Request, obj any)

Source from the content-addressed store, hash-verified

39}
40
41func (formPostBinding) Bind(req *http.Request, obj any) error {
42 if err := req.ParseForm(); err != nil {
43 return err
44 }
45 if err := mapForm(obj, req.PostForm); err != nil {
46 return err
47 }
48 return validate(obj)
49}
50
51func (formMultipartBinding) Name() string {
52 return "multipart/form-data"

Callers

nothing calls this directly

Calls 2

mapFormFunction · 0.85
validateFunction · 0.70

Tested by

no test coverage detected