Documentation ¶
Overview ¶
Package attr provides data structures for representing sets of keyed attributes.
This package is an implementation detail of the dep and version packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mask ¶
type Mask uint8
A Mask is a bitmask of reserved, widely used, no-valued attributes whose presence in a Set is the indicator. All eight bits may be set; their semantics are defined by the user of this package.
type Set ¶
type Set struct { // Mask is a bitmask that may be manipulated directly. // See the Mask type doc for details. Mask Mask // contains filtered or unexported fields }
Set is a collection of attributes, represented as a Mask and a map of arbitrary uint8 keys to string values.
The zero value of Set is an empty, default set.
func (Set) Compare ¶
Compare returns -1, 0 or 1 depending on whether the Set is ordered before, equal to or after the other Set.
func (Set) ForEachAttr ¶
ForEachAttr calls f for each attribute in ascending key order.