Skip to content

Commit f8ac95e

Browse files
authored
log: remove unused parameter (#30432)
1 parent 65e5ca7 commit f8ac95e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

log/format.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (h *TerminalHandler) format(buf []byte, r slog.Record, usecolor bool) []byt
7979
}
8080

8181
func (h *TerminalHandler) formatAttributes(buf *bytes.Buffer, r slog.Record, color string) {
82-
writeAttr := func(attr slog.Attr, first, last bool) {
82+
writeAttr := func(attr slog.Attr, last bool) {
8383
buf.WriteByte(' ')
8484

8585
if color != "" {
@@ -107,11 +107,11 @@ func (h *TerminalHandler) formatAttributes(buf *bytes.Buffer, r slog.Record, col
107107
var n = 0
108108
var nAttrs = len(h.attrs) + r.NumAttrs()
109109
for _, attr := range h.attrs {
110-
writeAttr(attr, n == 0, n == nAttrs-1)
110+
writeAttr(attr, n == nAttrs-1)
111111
n++
112112
}
113113
r.Attrs(func(attr slog.Attr) bool {
114-
writeAttr(attr, n == 0, n == nAttrs-1)
114+
writeAttr(attr, n == nAttrs-1)
115115
n++
116116
return true
117117
})

0 commit comments

Comments
 (0)