You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Copyright 2025 The Gitea Authors. All rights reserved.
2
+
// SPDX-License-Identifier: MIT
3
+
4
+
package session
5
+
6
+
import (
7
+
"bytes"
8
+
"encoding/gob"
9
+
"net/http"
10
+
11
+
"gitea.com/go-chi/session"
12
+
)
13
+
14
+
typemockMemRawStorestruct {
15
+
s*session.MemStore
16
+
}
17
+
18
+
var_ session.RawStore= (*mockMemRawStore)(nil)
19
+
20
+
func (m*mockMemRawStore) Set(k, vany) error {
21
+
// We need to use gob to encode the value, to make it have the same behavior as other stores and catch abuses.
22
+
// Because gob needs to "Register" the type before it can encode it, and it's unable to decode a struct to "any" so use a map to help to decode the value.
0 commit comments