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

add check ineffect and gofmt

This commit is contained in:
astaxie
2017-04-28 21:38:08 +08:00
parent f311ae9ebe
commit 3e29078f68
6 changed files with 24 additions and 13 deletions

View File

@ -87,9 +87,16 @@ func (fs *FileSessionStore) SessionRelease(w http.ResponseWriter) {
var f *os.File
if err == nil {
f, err = os.OpenFile(path.Join(filepder.savePath, string(fs.sid[0]), string(fs.sid[1]), fs.sid), os.O_RDWR, 0777)
if err != nil {
SLogger.Println(err)
return
}
} else if os.IsNotExist(err) {
f, err = os.Create(path.Join(filepder.savePath, string(fs.sid[0]), string(fs.sid[1]), fs.sid))
if err != nil {
SLogger.Println(err)
return
}
} else {
return
}