Skip to content

Commit

Permalink
Fixed typo in 'Destroy'
Browse files Browse the repository at this point in the history
Simple, nit-picky typo fixes.
  • Loading branch information
muesli committed Jul 21, 2019
1 parent cc384d7 commit 8913639
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions modules/session/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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
}

Expand Down
6 changes: 3 additions & 3 deletions modules/session/virtual.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8913639

Please sign in to comment.