Merge pull request #102 from yunify/build-structslice-withstringslice-req
struce slice with string slice req
This commit is contained in:
commit
8d9d57803e
|
@ -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, ",")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue