Skip to content

Commit

Permalink
Method to replace all params (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethantkoenig authored and unknwon committed Aug 16, 2017
1 parent adc5043 commit 48708a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions context.go
Expand Up @@ -268,6 +268,11 @@ func (ctx *Context) SetParams(name, val string) {
ctx.params[name] = val
}

// ReplaceAllParams replace all current params with given params
func (ctx *Context) ReplaceAllParams(params Params) {
ctx.params = params;
}

// ParamsEscape returns escapred params result.
// e.g. ctx.ParamsEscape(":uname")
func (ctx *Context) ParamsEscape(name string) string {
Expand Down

0 comments on commit 48708a0

Please sign in to comment.