This commit is contained in:
cui 2026-06-18 19:40:46 +00:00 committed by GitHub
commit c06ac35742
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,6 +7,7 @@ import (
"log/slog" "log/slog"
"math/big" "math/big"
"reflect" "reflect"
"slices"
"sync" "sync"
"time" "time"
@ -97,7 +98,7 @@ func (h *TerminalHandler) WithAttrs(attrs []slog.Attr) slog.Handler {
wr: h.wr, wr: h.wr,
lvl: h.lvl, lvl: h.lvl,
useColor: h.useColor, useColor: h.useColor,
attrs: append(h.attrs, attrs...), attrs: append(slices.Clone(h.attrs), attrs...),
fieldPadding: make(map[string]int), fieldPadding: make(map[string]int),
} }
} }