Skip to content

Commit

Permalink
chore: singleton instance of database
Browse files Browse the repository at this point in the history
  • Loading branch information
puni9869 committed Jan 22, 2024
1 parent 02dcd38 commit 3d83e20
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/database/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ import (

var (
// dbObj is the instance of the database
dbObj *gorm.DB
once sync.Once
dbObjLock sync.Mutex
dbObj *gorm.DB
once sync.Once
)

// NewLogger returns the SQL logger configuration
Expand Down

0 comments on commit 3d83e20

Please sign in to comment.