summaryrefslogtreecommitdiff
path: root/middleware/session/memstore.go
diff options
context:
space:
mode:
Diffstat (limited to 'middleware/session/memstore.go')
-rw-r--r--middleware/session/memstore.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/middleware/session/memstore.go b/middleware/session/memstore.go
index 2fcef39..d8cb958 100644
--- a/middleware/session/memstore.go
+++ b/middleware/session/memstore.go
@@ -1,7 +1,6 @@
package session
import (
- "context"
"sync"
)
@@ -9,22 +8,22 @@ type MemoryStore struct {
store sync.Map
}
-func (s *MemoryStore) Load(ctx context.Context, sessionID string) Value {
+func (s *MemoryStore) Load(sessionID string) Values {
val, ok := s.store.Load(sessionID)
if ok {
- return val.(Value)
+ return val.(Values)
}
- return Value{}
+ return Values{}
}
-func (s *MemoryStore) Save(ctx context.Context, sessionID string, value Value) error {
+func (s *MemoryStore) Save(sessionID string, value Values) error {
s.store.Store(sessionID, value)
return nil
}
-func (s *MemoryStore) Remove(ctx context.Context, sessionID string) error {
+func (s *MemoryStore) Remove(sessionID string) error {
s.store.Delete(sessionID)
return nil