Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 631 Bytes

readme.md

File metadata and controls

30 lines (21 loc) · 631 Bytes

session-redis

session store backend for gorilla/sessions - src.

Requirements

Base on go-redis

Installation

go get -u github.com/hellowords/gsr

Example

client := redis.NewClient(&redis.Options{
		Addr:     "localhost:6379",
		Password: "",
		PoolSize: 10,
	})
store, err := NewRedisStoreWithDB(client, []byte("new-key"))
session ,err = store.Get(req,"session-key")
session.Values["hello"] = "bar"

Reference

github.com/boj/redistore