top

Package sessions contains middleware for easy session management in Martini.

 package main

 import (
   "github.com/go-martini/martini"
   "github.com/martini-contrib/sessions"
 )

 func main() {
	  m := martini.Classic()

	  store := sessions.NewCookieStore([]byte("secret123"))
	  m.Use(sessions.Sessions("my_session", store))

	  m.Get("/", func(session sessions.Session) string {
		  session.Set("hello", "world")
	  })
 }

Imported by 9 package(s)

  1. github.com/easykoo/easy_go/src
  2. github.com/easykoo/go-blog
  3. github.com/easykoo/go-blog/middleware
  4. github.com/easykoo/go-display
  5. github.com/easykoo/go-display/middleware
  6. github.com/liudch/go-blog
  7. github.com/liudch/go-blog/middleware
  8. github.com/royburns/go-blog
  9. github.com/royburns/go-blog/middleware

Imports 3 package(s)

  1. github.com/gorilla/sessions
  2. github.com/go-martini/martini
  3. github.com/gorilla/context