Skip to content

proposal: log/slog: add iterator form of Record.Attrs  #61934

@jba

Description

@jba

log/slog.Record.Attrs is used to iterate over the attributes stored in a record:

func (Record) Attrs(f func(Attr) bool)

If #61897 is accepted, we propose adding a method that fits better with that proposal:

func (Record) AllAttrs() iter.Seq[Attr]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions