mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-07-03 17:22:33 +00:00
Fix ctx bug
This commit is contained in:
@@ -45,7 +45,7 @@ func (d *Database) Name() string {
|
|||||||
// New function creates new database context with same client
|
// New function creates new database context with same client
|
||||||
func (d *Database) New(ctx context.Context) mongox.Database {
|
func (d *Database) New(ctx context.Context) mongox.Database {
|
||||||
|
|
||||||
if ctx != nil {
|
if ctx == nil {
|
||||||
ctx = context.Background()
|
ctx = context.Background()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user