Skip to content

Commit

Permalink
fix(README): NewHandler takes *Options
Browse files Browse the repository at this point in the history
  • Loading branch information
telemachus committed Aug 14, 2023
1 parent 655fadb commit 20903f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ logger.Error("Ooops", slog.Any("error", err))
// ERROR | Ooops | error="error message" time="2023-04-02T10:50.09 EDT"

// You can also set options. Again, see the next section for more details.
opts := humane.Options{
opts := &humane.Options{
Level: slog.LevelError,
TimeFormat: time.RFC3339
}
Expand Down Expand Up @@ -93,7 +93,7 @@ func removeTime(_ []string, a slog.Attr) slog.Attr {
}
return a
}
opts := humane.Options{ReplaceAttr: removeTime}
opts := &humane.Options{ReplaceAttr: removeTime}
logger := slog.New(humane.NewHandler(os.Stdout, opts))
```

Expand Down

0 comments on commit 20903f1

Please sign in to comment.