Skip to content
Myr

deprecated.go

This file

Path

deprecated.go

23 lines · 762 bytes · Go

Last changed by

Not known.

History of this file

Take it

1// Copyright 2014 Manu Martinez-Almeida. All rights reserved.2// Use of this source code is governed by a MIT style3// license that can be found in the LICENSE file.45package gin67import (8	"log"910	"github.com/gin-gonic/gin/binding"11)1213// BindWith binds the passed struct pointer using the specified binding engine.14// See the binding package.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 to19	be deprecated, please check issue #662 and either use MustBindWith() if you20	want HTTP 400 to be automatically returned if any error occur, or use21	ShouldBindWith() if you need to manage the error.`)22	return c.MustBindWith(obj, b)23}