Skip to content

Commit dfcb80c

Browse files
committed
context: handle special case in Context.SetParams
1 parent f747138 commit dfcb80c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,15 @@ func (ctx *Context) Params(name string) string {
262262

263263
// SetParams sets value of param with given name.
264264
func (ctx *Context) SetParams(name, val string) {
265-
if !strings.HasPrefix(name, ":") {
265+
if name != "*" && !strings.HasPrefix(name, ":") {
266266
name = ":" + name
267267
}
268268
ctx.params[name] = val
269269
}
270270

271271
// ReplaceAllParams replace all current params with given params
272272
func (ctx *Context) ReplaceAllParams(params Params) {
273-
ctx.params = params;
273+
ctx.params = params
274274
}
275275

276276
// ParamsEscape returns escapred params result.

macaron.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"github.com/go-macaron/inject"
3333
)
3434

35-
const _VERSION = "1.3.1.0306"
35+
const _VERSION = "1.3.2.1216"
3636

3737
func Version() string {
3838
return _VERSION

0 commit comments

Comments
 (0)