Merge pull request #103 from yunify/add-stringslice-nil-check

add nil check
This commit is contained in:
runzexia 2018-07-06 16:28:22 +08:00 committed by GitHub
commit 2ca02f74c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -211,7 +211,10 @@ func (b *Builder) parseRequestParams() error {
dst[i] = *(fieldValue[i])
}
}
requestParams[tagKey] = strings.Join(dst, ",")
if len(dst) != 0 {
requestParams[tagKey] = strings.Join(dst, ",")
}
}
}
}