mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 18:00:55 +00:00
add Params for input
This commit is contained in:
parent
c68505e451
commit
9167587929
@ -274,6 +274,17 @@ func (input *BeegoInput) Param(key string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Params returns the map[key]value.
|
||||||
|
func (input *BeegoInput) Params() map[string]string {
|
||||||
|
m := make(map[string]string)
|
||||||
|
for i, v := range input.pnames {
|
||||||
|
if i <= len(input.pvalues) {
|
||||||
|
m[v] = input.pvalues[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return m
|
||||||
|
}
|
||||||
|
|
||||||
// SetParam will set the param with key and value
|
// SetParam will set the param with key and value
|
||||||
func (input *BeegoInput) SetParam(key, val string) {
|
func (input *BeegoInput) SetParam(key, val string) {
|
||||||
input.pvalues = append(input.pvalues, val)
|
input.pvalues = append(input.pvalues, val)
|
||||||
|
Loading…
Reference in New Issue
Block a user