Update README.md

This commit is contained in:
yosssi 2014-06-18 11:55:28 +09:00
parent edf6ef79e0
commit 1d950008e0
2 changed files with 3 additions and 9 deletions

View file

@ -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")
}

View file

@ -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