Skip to content

Commit ba0e7e7

Browse files
committed
do not duplicate bindAnyArgs in bindArgs
1 parent 68949f7 commit ba0e7e7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

named.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,6 @@ func bindAnyArgs(names []string, arg interface{}, m *reflectx.Mapper) ([]interfa
157157
// type, given a list of names to pull out of the struct. Used by public
158158
// BindStruct interface.
159159
func bindArgs(names []string, arg interface{}, m *reflectx.Mapper) ([]interface{}, error) {
160-
if maparg, ok := arg.(map[string]interface{}); ok {
161-
return bindMapArgs(names, maparg)
162-
}
163-
164160
arglist := make([]interface{}, 0, len(names))
165161

166162
// grab the indirected value of arg
@@ -206,7 +202,7 @@ func bindStruct(bindType int, query string, arg interface{}, m *reflectx.Mapper)
206202
return "", []interface{}{}, err
207203
}
208204

209-
arglist, err := bindArgs(names, arg, m)
205+
arglist, err := bindAnyArgs(names, arg, m)
210206
if err != nil {
211207
return "", []interface{}{}, err
212208
}

0 commit comments

Comments
 (0)