package server import ( "net/http" ) func NormalizeQueryValuesHandler(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() NormalizeQueryValues(query) r.URL.RawQuery = query.Encode() next.ServeHTTP(w, r) }) }