Skip to content

Commit

Permalink
feat: when the name is empty, WithGroup returns the receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Jul 10, 2024
1 parent 7f4ffda commit 8fca109
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ func (h *ParquetHandler) WithAttrs(attrs []slog.Attr) slog.Handler {
}

func (h *ParquetHandler) WithGroup(name string) slog.Handler {
// https://cs.opensource.google/go/x/exp/+/46b07846:slog/handler.go;l=247
if name == "" {
return h
}

return &ParquetHandler{
option: h.option,
attrs: h.attrs,
Expand Down

0 comments on commit 8fca109

Please sign in to comment.