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

ignore NilErr

This commit is contained in:
astaxie
2017-04-30 23:38:48 +08:00
parent 79b66ef053
commit 44bdf1df63
2 changed files with 4 additions and 11 deletions

View File

@ -113,13 +113,10 @@ func (lp *Provider) SessionInit(maxlifetime int64, savePath string) error {
func (lp *Provider) SessionRead(sid string) (session.Store, error) {
var (
kv map[interface{}]interface{}
kvs []byte
err error
)
if kvs, err = c.Get([]byte(sid)); err != nil {
return nil, err
}
kvs, _ := c.Get([]byte(sid))
if len(kvs) == 0 {
kv = make(map[interface{}]interface{})