<commit_before>package main

import (
	"fmt"
	"net/http"

	"github.com/ymichael/sessions"
	"github.com/zenazn/goji"
	"github.com/zenazn/goji/web"
)

var (
	Sessions = sessions.NewSessionOptions("thisismysecret.", &sessions.MemoryStore{})
)

func hello(c web.C, w http.ResponseWriter, r *http.Request) {
	x := Sessions.GetSession(&c)
	if val, ok := x["count"]; ok {
		x["count"] = val.(int) + 1
	} else {
		x["count"] = 1
	}
	fmt.Fprintf(w, "Hello, %d!", x["count"])
}

func main() {
	goji.Use(Sessions.Middleware())
	goji.Get("/", hello)
	goji.Serve()
}<commit_msg>Add ability to delete sessions.<commit_after>package main

import (
	"fmt"
	"net/http"

	"github.com/ymichael/sessions"
	"github.com/zenazn/goji"
	"github.com/zenazn/goji/web"
)

var (
	Sessions = sessions.NewSessionOptions("thisismysecret.", &sessions.MemoryStore{})
)

func hello(c web.C, w http.ResponseWriter, r *http.Request) {
	x := Sessions.GetSessionObject(&c)
	if val, ok := x["count"]; ok {
		x["count"] = val.(int) + 1
	} else {
		x["count"] = 1
	}
	fmt.Fprintf(w, "Hello, %d!", x["count"])
}

func destroy(c web.C, w http.ResponseWriter, r *http.Request) {
	Sessions.DestroySession(&c, w)
	http.Redirect(w, r, "/", 301)
}

func main() {
	goji.Use(Sessions.Middleware())
	goji.Get("/", hello)
	goji.Get("/destroy", destroy)
	goji.Serve()
}
{'fraction_non_alphanumeric': 0.20076045627376427, 'fraction_numerical': 0.00532319391634981, 'mean_word_length': 4.285140562248996, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7013584', 'n_tokens_mistral': 559, 'n_tokens_neox': 540, 'n_words': 102}