Documentation ¶
Index ¶
- type B
- type E
- type S
- type T
- func (t *T) Append(ttt ...*T)
- func (t *T) AppendUnique(tag *tag.T) *T
- func (t *T) Clone() (c *T)
- func (t *T) ContainsAny(tagName B, values ...B) bool
- func (t *T) Equal(ta *T) bool
- func (t *T) FilterOut(tagPrefix []B) *T
- func (t *T) GetAll(tagPrefix *tag.T) *T
- func (t *T) GetFirst(tagPrefix *tag.T) *tag.T
- func (t *T) GetLast(tagPrefix *tag.T) *tag.T
- func (t *T) Len() (l int)
- func (t *T) Less(i, j int) (less bool)
- func (t *T) MarshalJSON(dst B) (b B, err error)
- func (t *T) MarshalTo(dst B) []byte
- func (t *T) Scan(src any) (err error)
- func (t *T) String() string
- func (t *T) Swap(i, j int)
- func (t *T) ToStringSlice() (b [][]S)
- func (t *T) UnmarshalJSON(b B) (r B, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
T is a list of T - which are lists of string elements with ordering and no uniqueness constraint (not a set).
func (*T) AppendUnique ¶
AppendUnique appends a tag if it doesn't exist yet, otherwise does nothing. the uniqueness comparison is done based only on the first 2 elements of the tag.
func (*T) ContainsAny ¶
ContainsAny returns true if any of the strings given in `values` matches any of the tag elements.
func (*T) GetFirst ¶
GetFirst gets the first tag in tags that matches the prefix, see [T.StartsWith]
func (*T) Less ¶
Less evaluates two tags and returns if one is less than the other. Fields are lexicographically compared, so a < b.
If two tags are greater than or equal up to the length of the shortest.
func (*T) MarshalTo ¶
MarshalTo appends the JSON encoded byte of T as [][]string to dst. String escaping is as described in RFC8259.
func (*T) Scan ¶
Scan parses a string or raw bytes that should be a string and embeds the values into the tags variable from which this method is invoked.
todo: wut is this?