Iter returns an iterator over the attributes. !WARNING! Don't delete items from the Attributes while iterating. If you need to filter attributes, use the Filter method.
()
| 118 | // !WARNING! Don't delete items from the Attributes while iterating. |
| 119 | // If you need to filter attributes, use the Filter method. |
| 120 | func (a *Attributes) Iter() iter.Seq[*Attribute] { |
| 121 | return slices.Values(a.s) |
| 122 | } |
| 123 | |
| 124 | // Filter removes all attributes that do not satisfy the predicate function. |
| 125 | func (a *Attributes) Filter(pred func(*Attribute) bool) { |
no outgoing calls
no test coverage detected