We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dee0ddd commit e13719cCopy full SHA for e13719c
context.go
@@ -51,7 +51,7 @@ func (c *Context) Socket() *websocket.Conn {
51
// P returns path parameter by index.
52
func (c *Context) P(i int) (value string) {
53
l := len(c.pnames)
54
- if i <= l {
+ if i < l {
55
value = c.pvalues[i]
56
}
57
return
@@ -61,7 +61,7 @@ func (c *Context) P(i int) (value string) {
61
func (c *Context) Param(name string) (value string) {
62
63
for i, n := range c.pnames {
64
- if n == name && i <= l {
+ if n == name && i < l {
65
66
break
67
0 commit comments