Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
// Copyright 2014 Manu Martinez-Almeida. All rights reserved.
|
|
2 |
// Use of this source code is governed by a MIT style
|
|
3 |
// license that can be found in the LICENSE file.
|
|
4 |
|
|
5 |
package gin |
|
6 |
|
|
7 |
import ( |
|
8 |
"log"
|
|
9 |
|
|
10 |
"github.com/gin-gonic/gin/binding"
|
|
11 |
)
|
|
12 |
|
|
13 |
// BindWith binds the passed struct pointer using the specified binding engine.
|
|
14 |
// See the binding package.
|
|
15 |
func (c *Context) BindWith(obj interface{}, b binding.Binding) error { |
|
16 | 6 |
log.Println(`BindWith(\"interface{}, binding.Binding\") error is going to |
17 | 6 |
be deprecated, please check issue #662 and either use MustBindWith() if you
|
18 | 6 |
want HTTP 400 to be automatically returned if any error occur, or use
|
19 | 6 |
ShouldBindWith() if you need to manage the error.`) |
20 | 6 |
return c.MustBindWith(obj, b) |
21 |
}
|
Read our documentation on viewing source code .