mirror of
https://github.com/labstack/echo.git
synced 2025-01-16 02:33:26 +02:00
fix getting miltiple query params
This commit is contained in:
parent
0d2dac7532
commit
7fee34fade
@ -30,8 +30,11 @@ func (u *URL) QueryParam(name string) string {
|
||||
func (u *URL) QueryParams() (params map[string][]string) {
|
||||
params = make(map[string][]string)
|
||||
u.QueryArgs().VisitAll(func(k, v []byte) {
|
||||
// TODO: Filling with only first value
|
||||
params[string(k)] = []string{string(v)}
|
||||
_, ok := params[string(k)]
|
||||
if !ok {
|
||||
params[string(k)] = make([]string, 0)
|
||||
}
|
||||
params[string(k)] = append(params[string(k)], string(v))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user