mirror of
https://github.com/astaxie/beego.git
synced 2025-06-11 20:30:39 +00:00
Merge pull request #2085 from danielscottt/reset-params
adds ability to reset params after a filter runs
This commit is contained in:
@ -301,6 +301,14 @@ func (input *BeegoInput) SetParam(key, val string) {
|
||||
input.pnames = append(input.pnames, key)
|
||||
}
|
||||
|
||||
// ResetParams clears any of the input's Params
|
||||
// This function is used to clear parameters so they may be reset between filter
|
||||
// passes.
|
||||
func (input *BeegoInput) ResetParams() {
|
||||
input.pnames = input.pnames[:0]
|
||||
input.pvalues = input.pvalues[:0]
|
||||
}
|
||||
|
||||
// Query returns input data item string by a given string.
|
||||
func (input *BeegoInput) Query(key string) string {
|
||||
if val := input.Param(key); val != "" {
|
||||
|
Reference in New Issue
Block a user