-
Notifications
You must be signed in to change notification settings - Fork 1
Introducing query string normalizer which fixes retarded php query string handling. #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
httpx/middleware/query_normalizer.go
Outdated
|
|
||
| // WithQueryNormalizer fixes wrong php query string handling as array | ||
| func WithQueryNormalizer(h http.Handler) http.Handler { | ||
| rxp, e := regexp.Compile("\\[[0-9]+\\]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e should be err
httpx/middleware/query_normalizer.go
Outdated
| } | ||
|
|
||
| func getNormalizedValue(key string, qVal []string, rxp *regexp.Regexp) (string, []string) { | ||
| isNastyArray := rxp.Match([]byte(key)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think twice about using Regex here. It is very expensive.
httpx/middleware/query_normalizer.go
Outdated
| return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
| q := r.URL.Query() | ||
|
|
||
| normalizedQuery := make(url.Values, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either use url.Values{} or optimise for the expected length. The latter is preferable.
httpx/middleware/query_normalizer.go
Outdated
| func WithQueryNormalizer(h http.Handler) http.Handler { | ||
| rxp, e := regexp.Compile("\\[[0-9]+\\]") | ||
| if e != nil { | ||
| panic(e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is panicing here a good idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only reason why there can be error is badly created regexp. If so, then why not panic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it is ok in this case, but rather use MustCompile.
httpx/middleware/query_normalizer.go
Outdated
| }) | ||
| } | ||
|
|
||
| func getNormalizedValue(key string, qVal []string, rxp *regexp.Regexp) (string, []string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you normalising the value or the key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think normizeKey would be better
| func WithQueryNormalizer(h http.Handler) http.Handler { | ||
| return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
| if i := strings.Index(r.URL.RawQuery, "["); i == -1 { | ||
| return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to delegate the request before returning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ofc.
httpx/middleware/query_normalizer.go
Outdated
| // WithQueryNormalizer fixes wrong php query string handling as array | ||
| func WithQueryNormalizer(h http.Handler) http.Handler { | ||
| return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
| if i := strings.Index(r.URL.RawQuery, "["); i == -1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i is not needed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true
httpx/middleware/query_normalizer.go
Outdated
| }) | ||
| } | ||
|
|
||
| func getNormalizedValue(key string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming: You are not normalising a value. Call it normalizeQueryKey instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
httpx/middleware/query_normalizer.go
Outdated
| } | ||
|
|
||
| q := r.URL.Query() | ||
| normalizedQuery := make(url.Values, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pessimistically assign the map size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use len(q), but for small maps it would make very little to no difference. If we needlessly allocated more space than needed, it could get, in fact, slower. I would leave it up to @rafalmnich .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not changing anything in benchmarks with even for query with many changes like:
/?param[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val¶m[smth][0]=zero¶m[smth][0][val][1][asdf][4][asetrhyty][5][ewrytu][7][aerterwert][7]=val
httpx/middleware/query_normalizer.go
Outdated
| q := r.URL.Query() | ||
| normalizedQuery := make(url.Values, 0) | ||
|
|
||
| for key, qVal := range q { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming: qVal should be vals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
No description provided.