Fix ctx bug

v2
Nikita Tokarchuk 5 years ago
parent f3adfb039a
commit cf23c3b579
  1. 2
      mongox/database/database.go

@ -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()
} }

Loading…
Cancel
Save