From bc2195b07f0a1d8d8c6bfabd0308a3de4abd8dca Mon Sep 17 00:00:00 2001 From: JessonChan Date: Thu, 12 Nov 2015 16:59:07 +0800 Subject: [PATCH] code simplify --- context/output.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/output.go b/context/output.go index 4d902487..f0d66f36 100644 --- a/context/output.go +++ b/context/output.go @@ -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") } }