@@ -2,7 +2,7 @@ package mux
22
33import "strings"
44
5- type UrlQuery map[string][]string
5+ type QueryValues map[string][]string
66
77/*
88Query() returns a full map of key-listValue from request
@@ -11,8 +11,8 @@ to get single param by key, use: req.Query().Get("key")
1111to get request path use GetPath()
1212*/
1313
14- func (r *Request) QueryFull() (UrlQuery , string) {
15- urlQueries := UrlQuery {}
14+ func (r *Request) QueryFull() (QueryValues , string) {
15+ urlQueries := QueryValues {}
1616 pathQuery := ""
1717 // checking if there is query in r.Path
1818 if strings.Contains(r.Path, "?") {
@@ -48,15 +48,15 @@ func (r *Request) QueryFull() (UrlQuery, string) {
4848
4949// get the query by key
5050// if there is more than one query, returns the very first param
51- func (qs UrlQuery ) Get(key string) string {
51+ func (qs QueryValues ) Get(key string) string {
5252 listMatching, ok := qs[key]
5353 if ok {
5454 return listMatching[0]
5555 }
5656 return ""
5757}
5858
59- func (r *Request) Query() UrlQuery {
59+ func (r *Request) Query() QueryValues {
6060 uQuery, _ := r.QueryFull()
6161 return uQuery
6262}
0 commit comments