From 1d950008e04b1558f331956297fad887767c08e8 Mon Sep 17 00:00:00 2001 From: yosssi Date: Wed, 18 Jun 2014 11:55:28 +0900 Subject: [PATCH] Update README.md --- README.md | 8 +------- reaper/doc.go | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8d69b79..79109f7 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ import ( var db *bolt.DB func handler(w http.ResponseWriter, r *http.Request) { - // Fetch a new store. + // Create a store. str, err := store.New(db, store.Config{}, []byte("secret-key")) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) @@ -52,12 +52,6 @@ func handler(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) } - // Delete the session. - session.Options.MaxAge = -1 - if err := sessions.Save(r, w); err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } - fmt.Fprintf(w, "Hello BoltStore") } diff --git a/reaper/doc.go b/reaper/doc.go index df8177d..6eac06e 100644 --- a/reaper/doc.go +++ b/reaper/doc.go @@ -1,5 +1,5 @@ /* -Package reaper provides a reaper which removes -expired sessions. +Package reaper provides a reaper which checks and removes +expired sessions periodically. */ package reaper