struce slice with string slice

This commit is contained in:
runzexia 2018-07-03 14:57:33 +08:00
parent ccbddbb914
commit 16458a2b4b
1 changed files with 8 additions and 0 deletions

View File

@ -204,6 +204,14 @@ func (b *Builder) parseRequestParams() error {
if fieldValue != nil {
requestParams[tagKey] = *fieldValue
}
case []*string:
dst := make([]string, len(fieldValue))
for i := 0; i < len(fieldValue); i++ {
if fieldValue[i] != nil {
dst[i] = *(fieldValue[i])
}
}
requestParams[tagKey] = strings.Join(dst, ",")
}
}
}