1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-11 04:50:40 +00:00
Fixes warnings and errors raised by gometalinter and gosimple.
This commit is contained in:
Faissal Elamraoui
2017-04-23 19:07:12 +02:00
parent 3bb4ca5adc
commit bf6bd6b292
17 changed files with 99 additions and 118 deletions

View File

@ -30,13 +30,13 @@ func (p *SsdbProvider) connectInit() error {
}
func (p *SsdbProvider) SessionInit(maxLifetime int64, savePath string) error {
var e error = nil
p.maxLifetime = maxLifetime
address := strings.Split(savePath, ":")
p.host = address[0]
p.port, e = strconv.Atoi(address[1])
if e != nil {
return e
var err error
if p.port, err = strconv.Atoi(address[1]); err != nil {
return err
}
return p.connectInit()
}
@ -78,8 +78,8 @@ func (p *SsdbProvider) SessionExist(sid string) bool {
return false
}
return true
}
func (p *SsdbProvider) SessionRegenerate(oldsid, sid string) (session.Store, error) {
//conn.Do("setx", key, v, ttl)
if p.client == nil {
@ -123,7 +123,6 @@ func (p *SsdbProvider) SessionDestroy(sid string) error {
}
func (p *SsdbProvider) SessionGC() {
return
}
func (p *SsdbProvider) SessionAll() int {