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