1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 23:30:50 +00:00

code simplify

This commit is contained in:
JessonChan 2015-11-12 16:59:07 +08:00
parent 46fbeaadad
commit bc2195b07f

View File

@ -93,7 +93,7 @@ func (output *BeegoOutput) Cookie(name string, value string, others ...interface
if maxAge > 0 {
fmt.Fprintf(&b, "; Expires=%s; Max-Age=%d", time.Now().Add(time.Duration(maxAge)*time.Second).UTC().Format(time.RFC1123), maxAge)
} else if maxAge <= 0 {
} else {
fmt.Fprintf(&b, "; Max-Age=0")
}
}