Skip to content
Snippets Groups Projects
Commit 058f3f36 authored by Johan de Klerk's avatar Johan de Klerk
Browse files

Dont split values if it an empty string

parent de384247
No related branches found
No related tags found
No related merge requests found
......@@ -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 [...]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment