fix struct array parameter name error
This commit is contained in:
parent
db89622804
commit
1a0f756c86
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue