Skip to content

Support attr action #1

@DaltonSW

Description

@DaltonSW

Added in Go 1.25.0

From the release notes:

The new methods T.Attr, B.Attr, and F.Attr emit an attribute to the test log. An attribute is an arbitrary key and value associated with a test.

For example, in a test named TestF, t.Attr("key", "value") emits:

=== ATTR TestF key value

With the -json flag, attributes appear as a new “attr” action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions