Skip to content

Commit 8913639

Browse files
committed
Fixed typo in 'Destroy'
Simple, nit-picky typo fixes.
1 parent cc384d7 commit 8913639

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

modules/session/memory.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ func (p *MemProvider) Exist(sid string) bool {
148148
return ok
149149
}
150150

151-
// Destory deletes a session by session ID.
152-
func (p *MemProvider) Destory(sid string) error {
151+
// Destroy deletes a session by session ID.
152+
func (p *MemProvider) Destroy(sid string) error {
153153
p.lock.Lock()
154154
defer p.lock.Unlock()
155155

@@ -174,7 +174,7 @@ func (p *MemProvider) Regenerate(oldsid, sid string) (session.RawStore, error) {
174174
return nil, err
175175
}
176176

177-
if err = p.Destory(oldsid); err != nil {
177+
if err = p.Destroy(oldsid); err != nil {
178178
return nil, err
179179
}
180180

modules/session/virtual.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ func (o *VirtualSessionProvider) Exist(sid string) bool {
7575
return true
7676
}
7777

78-
// Destory deletes a session by session ID.
79-
func (o *VirtualSessionProvider) Destory(sid string) error {
78+
// Destroy deletes a session by session ID.
79+
func (o *VirtualSessionProvider) Destroy(sid string) error {
8080
o.lock.Lock()
8181
defer o.lock.Unlock()
82-
return o.provider.Destory(sid)
82+
return o.provider.Destroy(sid)
8383
}
8484

8585
// Regenerate regenerates a session store from old session ID to new one.

0 commit comments

Comments
 (0)