diff options
author | Tamal Saha <tamal@appscode.com> | 2019-08-23 09:40:30 -0700 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-08-23 12:40:29 -0400 |
commit | 171b3598778a1ecd0a921c71ed6755bfef68f7f0 (patch) | |
tree | 02857629ef9e8e26ee0ee559153f803f77b588b7 /modules/session | |
parent | ca6fb004ac50fc924861112403895d637c6a2d1d (diff) | |
download | gitea-171b3598778a1ecd0a921c71ed6755bfef68f7f0.tar.gz gitea-171b3598778a1ecd0a921c71ed6755bfef68f7f0.zip |
Use gitea forked macaron (#7933)
Signed-off-by: Tamal Saha <tamal@appscode.com>
Diffstat (limited to 'modules/session')
-rw-r--r-- | modules/session/memory.go | 8 | ||||
-rw-r--r-- | modules/session/virtual.go | 20 |
2 files changed, 14 insertions, 14 deletions
diff --git a/modules/session/memory.go b/modules/session/memory.go index 9c493bfe15..4f72feac9b 100644 --- a/modules/session/memory.go +++ b/modules/session/memory.go @@ -22,7 +22,7 @@ import ( "sync" "time" - "github.com/go-macaron/session" + "gitea.com/macaron/session" ) // MemStore represents a in-memory session store implementation. @@ -148,8 +148,8 @@ func (p *MemProvider) Exist(sid string) bool { return ok } -// Destory deletes a session by session ID. -func (p *MemProvider) Destory(sid string) error { +// Destroy deletes a session by session ID. +func (p *MemProvider) Destroy(sid string) error { p.lock.Lock() defer p.lock.Unlock() @@ -174,7 +174,7 @@ func (p *MemProvider) Regenerate(oldsid, sid string) (session.RawStore, error) { return nil, err } - if err = p.Destory(oldsid); err != nil { + if err = p.Destroy(oldsid); err != nil { return nil, err } diff --git a/modules/session/virtual.go b/modules/session/virtual.go index b8ddd2f71b..027960a289 100644 --- a/modules/session/virtual.go +++ b/modules/session/virtual.go @@ -10,13 +10,13 @@ import ( "fmt" "sync" - "github.com/go-macaron/session" - couchbase "github.com/go-macaron/session/couchbase" - memcache "github.com/go-macaron/session/memcache" - mysql "github.com/go-macaron/session/mysql" - nodb "github.com/go-macaron/session/nodb" - postgres "github.com/go-macaron/session/postgres" - redis "github.com/go-macaron/session/redis" + "gitea.com/macaron/session" + couchbase "gitea.com/macaron/session/couchbase" + memcache "gitea.com/macaron/session/memcache" + mysql "gitea.com/macaron/session/mysql" + nodb "gitea.com/macaron/session/nodb" + postgres "gitea.com/macaron/session/postgres" + redis "gitea.com/macaron/session/redis" ) // VirtualSessionProvider represents a shadowed session provider implementation. @@ -75,11 +75,11 @@ func (o *VirtualSessionProvider) Exist(sid string) bool { return true } -// Destory deletes a session by session ID. -func (o *VirtualSessionProvider) Destory(sid string) error { +// Destroy deletes a session by session ID. +func (o *VirtualSessionProvider) Destroy(sid string) error { o.lock.Lock() defer o.lock.Unlock() - return o.provider.Destory(sid) + return o.provider.Destroy(sid) } // Regenerate regenerates a session store from old session ID to new one. |