Skip to content

Commit 84ac819

Browse files
committed
change method name
1 parent 2e87b46 commit 84ac819

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/log/slog/record.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ func (r Record) Attrs(f func(Attr) bool) {
9393
}
9494
}
9595

96-
// AttrsIter returns an iterator over every attribute in the [Record].
97-
func (r Record) AttrsIter() iter.Seq[Attr] {
96+
// AllAttrs returns an iterator over every attribute in the [Record].
97+
func (r Record) AllAttrs() iter.Seq[Attr] {
9898
return func(yield func(Attr) bool) {
9999
r.Attrs(yield)
100100
}

src/log/slog/record_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func TestRecordAttrs(t *testing.T) {
4141
// Hit both loops in Record.Attrs: front and back.
4242
for _, stop := range []int{2, 6} {
4343
var got []Attr
44-
for a := range r.AttrsIter() {
44+
for a := range r.AllAttrs() {
4545
got = append(got, a)
4646
if len(got) < stop {
4747
break

0 commit comments

Comments
 (0)