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

Method ShouldBindWith

context.go:919–921  ·  view source on GitHub ↗

ShouldBindWith binds the passed struct pointer using the specified binding engine. See the binding package.

(obj any, b binding.Binding)

Source from the content-addressed store, hash-verified

917// ShouldBindWith binds the passed struct pointer using the specified binding engine.
918// See the binding package.
919func (c *Context) ShouldBindWith(obj any, b binding.Binding) error {
920 return b.Bind(c.Request, obj)
921}
922
923// ShouldBindBodyWith is similar with ShouldBindWith, but it stores the request
924// body into the context, and reuse when it is called again.

Callers 9

MustBindWithMethod · 0.95
ShouldBindMethod · 0.95
ShouldBindJSONMethod · 0.95
ShouldBindXMLMethod · 0.95
ShouldBindQueryMethod · 0.95
ShouldBindYAMLMethod · 0.95
ShouldBindTOMLMethod · 0.95
ShouldBindPlainMethod · 0.95
ShouldBindHeaderMethod · 0.95

Calls 1

BindMethod · 0.65

Tested by

no test coverage detected