Skip to content

Commit

Permalink
Fix bug that was not ignoring slices
Browse files Browse the repository at this point in the history
  • Loading branch information
Herbert Fischer committed Oct 19, 2017
1 parent 8972981 commit e85f058
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"net/url"
"os"
"path"
"reflect"
"strings"
"time"

Expand Down Expand Up @@ -101,9 +102,11 @@ func main() {
if value == nil {
continue
}
switch v := value.(type) {
case []int64, []int32, []int16, []int8, []int, []uint64, []uint32, []uint16, []uint8, []uint:
rt := reflect.TypeOf(value)
if rt.Kind() == reflect.Slice {
continue
}
switch v := value.(type) {
case int64, int32, int16, int8, int, uint64, uint32, uint16, uint8, uint:
values = append(values, fmt.Sprintf(`%s=%di`, valueKey, v))
case string:
Expand Down

0 comments on commit e85f058

Please sign in to comment.