Commit bc2195b0 authored by JessonChan's avatar JessonChan

code simplify

parent 46fbeaad
...@@ -93,7 +93,7 @@ func (output *BeegoOutput) Cookie(name string, value string, others ...interface ...@@ -93,7 +93,7 @@ func (output *BeegoOutput) Cookie(name string, value string, others ...interface
if maxAge > 0 { if maxAge > 0 {
fmt.Fprintf(&b, "; Expires=%s; Max-Age=%d", time.Now().Add(time.Duration(maxAge)*time.Second).UTC().Format(time.RFC1123), maxAge) 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") fmt.Fprintf(&b, "; Max-Age=0")
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment