Skip to content

Commit

Permalink
chore: sort
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Sep 11, 2024
1 parent 4eb0170 commit c506389
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions session/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ func NewManager(config config.Config, json foundation.Json) *Manager {
return manager
}

func (m *Manager) AcquireSession() *Session {
session := m.sessionPool.Get().(*Session)
return session
}

func (m *Manager) BuildSession(handler sessioncontract.Driver, sessionID ...string) sessioncontract.Session {
if handler == nil {
panic("session driver cannot be nil")

Check warning on line 45 in session/manager.go

View check run for this annotation

Codecov / codecov/patch

session/manager.go#L45

Added line #L45 was not covered by tests
Expand Down Expand Up @@ -80,11 +85,6 @@ func (m *Manager) Extend(driver string, handler func() sessioncontract.Driver) e
return nil
}

func (m *Manager) AcquireSession() *Session {
session := m.sessionPool.Get().(*Session)
return session
}

func (m *Manager) ReleaseSession(session sessioncontract.Session) {
s := session.(*Session)
s.reset()
Expand Down

0 comments on commit c506389

Please sign in to comment.