Skip to content

Commit

Permalink
client: support uint on queryString()
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Feb 21, 2018
1 parent 8a0e95e commit 5fe5204
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,10 @@ func addQueryStringValue(items url.Values, key string, v reflect.Value) {
if v.Int() > 0 {
items.Add(key, strconv.FormatInt(v.Int(), 10))
}
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
if v.Uint() > 0 {
items.Add(key, strconv.FormatUint(v.Uint(), 10))
}
case reflect.Float32, reflect.Float64:
if v.Float() > 0 {
items.Add(key, strconv.FormatFloat(v.Float(), 'f', -1, 64))
Expand Down

0 comments on commit 5fe5204

Please sign in to comment.