1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-12 08:50:39 +00:00

all: simplify boolean expressions

- !(a == b) => a != b
- !(a != b) => a == b

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
This commit is contained in:
Iskander Sharipov
2019-02-09 17:18:59 +03:00
parent 26a6b426f1
commit 67666dbe0f
4 changed files with 4 additions and 4 deletions

View File

@ -133,7 +133,7 @@ func (lp *Provider) SessionRead(sid string) (session.Store, error) {
// SessionExist check ledis session exist by sid
func (lp *Provider) SessionExist(sid string) bool {
count, _ := c.Exists([]byte(sid))
return !(count == 0)
return count != 0
}
// SessionRegenerate generate new sid for ledis session