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.
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.