replace strings.Split with SplitSeq

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2025-05-31 19:03:41 +02:00
parent 60af36813b
commit b6873768b2
7 changed files with 8 additions and 8 deletions

View File

@@ -161,7 +161,7 @@ func getURLPath(r *http.Request) string {
func getCommaSeparatedQueryParam(r *http.Request, key string) []string {
var result []string
for _, val := range strings.Split(r.URL.Query().Get(key), ",") {
for val := range strings.SplitSeq(r.URL.Query().Get(key), ",") {
val = strings.TrimSpace(val)
if val != "" {
result = append(result, val)