Documentation ¶
Index ¶
- Constants
- type BS
- type T
- func (t *T) Append(b B)
- func (t *T) Cap() int
- func (t *T) Clear()
- func (t *T) Clone() (c *T)
- func (t *T) Contains(s B) bool
- func (t *T) Equal(ta *T) bool
- func (t *T) FilterKey() B
- func (t *T) Key() B
- func (t *T) Len() int
- func (t *T) Less(i, j int) bool
- func (t *T) MarshalJSON(dst B) (b B, err error)
- func (t *T) Relay() (s B)
- func (t *T) Slice(start, end int) *T
- func (t *T) StartsWith(prefix *T) bool
- func (t *T) Swap(i, j int)
- func (t *T) ToByteSlice() (b []B)
- func (t *T) ToStringSlice() (b []S)
- func (t *T) UnmarshalJSON(b B) (r B, err error)
- func (t *T) Value() B
Constants ¶
const ( Key = iota Value Relay )
The tag position meanings so they are clear when reading.
const ( MarkerReply = "reply" MarkerRoot = "root" MarkerMention = "mention" )
T marker strings for e (reference) tags.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct {
Field []BS[B]
}
T is a list of strings with a literal ordering.
Not a set, there can be repeating elements.
func FromBytesSlice ¶ added in v0.1.7
func FromBytesSlice(fields ...B) (t *T)
func NewWithCap ¶
func (*T) FilterKey ¶ added in v0.1.7
func (t *T) FilterKey() B
FilterKey returns the first element of a filter tag (the key) with the # removed
func (*T) MarshalJSON ¶
MarshalJSON appends the JSON form to the passed bytes.
func (*T) StartsWith ¶
StartsWith checks a tag has the same initial set of elements.
The last element is treated specially in that it is considered to match if the candidate has the same initial substring as its corresponding element.
func (*T) ToByteSlice ¶
func (t *T) ToByteSlice() (b []B)
func (*T) ToStringSlice ¶
func (t *T) ToStringSlice() (b []S)
func (*T) UnmarshalJSON ¶
UnmarshalJSON decodes the provided JSON tag list (array of strings), and returns any remainder after the close bracket has been encountered.