Skip to content

Commit 1b42c68

Browse files
committed
refact var name
1 parent 29d1b9f commit 1b42c68

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/gno.land/p/demo/mux/query.gno

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package mux
22

33
import "strings"
44

5-
type UrlQuery map[string][]string
5+
type QueryValues map[string][]string
66

77
/*
88
Query() returns a full map of key-listValue from request
@@ -11,8 +11,8 @@ to get single param by key, use: req.Query().Get("key")
1111
to 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

Comments
 (0)