fix struct array parameter name error

This commit is contained in:
jolestar 2017-01-05 16:39:01 +08:00 committed by Aspire
parent db89622804
commit 1a0f756c86
1 changed files with 2 additions and 2 deletions

View File

@ -193,8 +193,8 @@ func (b *Builder) parseRequestParams() error {
item := valueArray.Index(i).Elem()
for j := 0; j < item.NumField(); j++ {
tagName := item.Type().Field(j).Tag.Get("name")
tagKey := tagName + "." + strconv.Itoa(i+1) + "." + tagName
fieldTagName := item.Type().Field(j).Tag.Get("name")
tagKey := tagName + "." + strconv.Itoa(i+1) + "." + fieldTagName
switch fieldValue := item.Field(j).Interface().(type) {
case int: