File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed
Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 99 "strings"
1010)
1111
12- // URLParam returns the params extracted from the URL
13- // not to be confused with Query Parameters
12+ // RequestVars returns the request scoped variables tracked by pure
1413func RequestVars (r * http.Request ) ReqVars {
1514
1615 rv := r .Context ().Value (defaultContextIdentifier )
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ type Param struct {
8181// It is therefore safe to read values by the index.
8282type Params []Param
8383
84+ // Get returns the URL parameter for the given key, or blank if not found
8485func (p Params ) Get (key string ) (param string ) {
8586
8687 for i := 0 ; i < len (p ); i ++ {
Original file line number Diff line number Diff line change @@ -52,12 +52,6 @@ func TestAllMethods(t *testing.T) {
5252 }
5353 })
5454
55- tooManyParams := ""
56-
57- for i := 0 ; i < 257 ; i ++ {
58- tooManyParams += "/" + "parm" + strconv .Itoa (i ) + "/:parm" + strconv .Itoa (i )
59- }
60-
6155 tests := []struct {
6256 method string
6357 path string
You can’t perform that action at this time.
0 commit comments