diff --git a/struct_utils/named_values_to_struct.go b/struct_utils/named_values_to_struct.go index b8f21428d27458b6e07102d5c0be664478ff6b20..ef07e61e82cb444ecc4466961af7b579e46e72d5 100644 --- a/struct_utils/named_values_to_struct.go +++ b/struct_utils/named_values_to_struct.go @@ -141,6 +141,9 @@ func NamedValuesFromURL(params map[string]string, multiValueParams map[string][] splitValues := []string{} for _, value := range values { //split only if valid CSV between [...] + if value == "" { + continue + } if value[0] == '[' && value[len(value)-1] == ']' { csvReader := csv.NewReader(strings.NewReader(value[1 : len(value)-1])) csvValues, csvErr := csvReader.Read() //this automatically removes quotes around some/all CSV inside the [...]