From da59b397fc4720582b43597147d2fc082d032abd Mon Sep 17 00:00:00 2001 From: Stephen McQuay Date: Tue, 26 Feb 2013 23:19:21 -0800 Subject: [PATCH] added logout --- handlers.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/handlers.go b/handlers.go index d4bc6ce..cb8a59f 100644 --- a/handlers.go +++ b/handlers.go @@ -26,9 +26,9 @@ func loginHandler(w http.ResponseWriter, req *http.Request) { } func logoutHandler(w http.ResponseWriter, req *http.Request) { - session, _ := store.Get(req, "creds") - delete(session.Values, "logged in") - session.Save(req, w) - http.Redirect(w, req, "/", http.StatusSeeOther) - return + session, _ := store.Get(req, "creds") + delete(session.Values, "logged in") + session.Save(req, w) + http.Redirect(w, req, "/", http.StatusSeeOther) + return }