context.go
func (ctx *Context) SetSession(key string, values map[string]string) error {
	sid := ctx.genSid(key)
	values["Sid"] = sid
	timestamp := strconv.FormatInt(time.Now().Unix(), 10)
	token := ctx.genSid(key + timestamp)
	values["Token"] = token
	store, err := provider.Set(sid, values)
	if err != nil {
		return err
	}
	cookie := httpCookie
	cookie.Value = sid
	ctx.Data["session"] = store

	respCookie := ctx.ResponseWriter.Header().Get("Set-Cookie")
	if strings.HasPrefix(respCookie, cookie.Name) {
		ctx.ResponseWriter.Header().Del("Set-Cookie")
	}
	http.SetCookie(ctx.ResponseWriter, &cookie)
	return nil
}
func (ctx *Context) SetSession(key string, values map[string]string) error {
	sid := ctx.genSid(key)
	values["Sid"] = sid
	timestamp := strconv.FormatInt(time.Now().Unix(), 10)
	token := ctx.genSid(key + timestamp)
	values["Token"] = token
	store, err := provider.Set(sid, values)
	if err != nil {
		return err
	}
	cookie := httpCookie
	cookie.Value = sid
	ctx.Data["session"] = store

	respCookie := ctx.ResponseWriter.Header().Get("Set-Cookie")
	if strings.HasPrefix(respCookie, cookie.Name) {
		ctx.ResponseWriter.Header().Del("Set-Cookie")
	}
	http.SetCookie(ctx.ResponseWriter, &cookie)
	return nil
}
// SetSession set session