mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 00:50:54 +00:00
delete useless if-stmt
This commit is contained in:
parent
cfff0f3b46
commit
2386c9c80d
@ -323,29 +323,21 @@ func (input *BeegoInput) SetParam(key, val string) {
|
||||
// This function is used to clear parameters so they may be reset between filter
|
||||
// passes.
|
||||
func (input *BeegoInput) ResetParams() {
|
||||
if len(input.pnames) > 0 {
|
||||
input.pnames = input.pnames[:0]
|
||||
}
|
||||
if len(input.pvalues) > 0 {
|
||||
input.pvalues = input.pvalues[:0]
|
||||
}
|
||||
}
|
||||
|
||||
// ResetData: reset data
|
||||
func (input *BeegoInput) ResetData() {
|
||||
input.dataLock.Lock()
|
||||
if input.data != nil {
|
||||
input.data = nil
|
||||
}
|
||||
input.dataLock.Unlock()
|
||||
}
|
||||
|
||||
// ResetBody: reset body
|
||||
func (input *BeegoInput) ResetBody() {
|
||||
if len(input.RequestBody) > 0 {
|
||||
input.RequestBody = []byte{}
|
||||
}
|
||||
}
|
||||
|
||||
// Clear: clear all data in input
|
||||
func (input *BeegoInput) Clear() {
|
||||
|
Loading…
Reference in New Issue
Block a user