Skip to content

Commit

Permalink
fix: remove slog usage
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh-2711 committed Dec 21, 2023
1 parent 635e354 commit 80eec7d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package mgod

import (
"context"
"log/slog"

"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
Expand All @@ -18,7 +17,6 @@ type TransactionFunc func(sc mongo.SessionContext) (interface{}, error)
func WithTransaction(ctx context.Context, transactionFunc TransactionFunc) (interface{}, error) {
session, err := mClient.StartSession()
if err != nil {
slog.ErrorContext(ctx, "Error occurred during WithTransaction", err)
return nil, err
}
defer session.EndSession(ctx)
Expand Down

0 comments on commit 80eec7d

Please sign in to comment.