Skip to content

Commit

Permalink
chore: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
orandin committed Aug 13, 2024
1 parent 7a05611 commit fb43b31
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ customLogger := sloggorm.New(
slogGorm.WithContextValue("slogAttrName1", "ctxKey"), // adds an slog.Attr if a value is found for this key in the Gorm's query context

slogGorm.WithContextFunc("slogAttrName2", func(ctx context.Context) (slog.Value, bool) {
v, ok := ctx.Value(ctxKey1).(time.Duration)
if !ok {
return slog.Value{}, false
}
return slog.DurationValue(v), true
}), // adds an slog.Attr if the given function returns an slog.Value and true
v, ok := ctx.Value(ctxKey1).(time.Duration)
if !ok {
return slog.Value{}, false
}
return slog.DurationValue(v), true
}), // adds an slog.Attr if the given function returns an slog.Value and true
)
```

Expand Down

0 comments on commit fb43b31

Please sign in to comment.