add logic and unit test for []string type in query params
diff --git a/params.go b/params.go
index 948783b..509a7c7 100644
--- a/params.go
+++ b/params.go
@@ -144,6 +144,13 @@
params.Add(tags[0], strconv.FormatInt(v.Int(), 10))
case reflect.Bool:
params.Add(tags[0], strconv.FormatBool(v.Bool()))
+ case reflect.Slice:
+ switch f.Type {
+ case reflect.TypeOf([]string{}):
+ for i := 0; i < v.Len(); i++ {
+ params.Add(tags[0], v.Index(i).String())
+ }
+ }
}
} else {
// Otherwise, the field is not set.