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

Method BindWith

deprecated.go:17–23  ·  view source on GitHub ↗

BindWith binds the passed struct pointer using the specified binding engine. See the binding package. Deprecated: Use MustBindWith or ShouldBindWith.

(obj any, b binding.Binding)

Source from the content-addressed store, hash-verified

15//
16// Deprecated: Use MustBindWith or ShouldBindWith.
17func (c *Context) BindWith(obj any, b binding.Binding) error {
18 log.Println(`BindWith(\"any, binding.Binding\") error is going to
19 be deprecated, please check issue #662 and either use MustBindWith() if you
20 want HTTP 400 to be automatically returned if any error occur, or use
21 ShouldBindWith() if you need to manage the error.`)
22 return c.MustBindWith(obj, b)
23}

Callers 1

TestBindWithFunction · 0.80

Calls 1

MustBindWithMethod · 0.95

Tested by 1

TestBindWithFunction · 0.64