Skip to content

Commit

Permalink
Document nil lp to New
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Mar 12, 2024
1 parent 9ce4320 commit 08e1bfd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bridges/sloghandler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ type Handler struct {
var _ slog.Handler = (*Handler)(nil)

// New returns a new [Handler] to be used as an [slog.Handler].
//
// If lp is nil, [noop.LoggerProvider] will be used as the default.
func New(lp log.LoggerProvider, _ ...Option) *Handler {
if lp == nil {
// Do not panic.
Expand Down

0 comments on commit 08e1bfd

Please sign in to comment.