Documentation
¶
Index ¶
- Constants
- type Tag
- type Tags
- func (t *Tags) Append(tag string, value string)
- func (t Tags) Index(name string) int
- func (t Tags) Literal() string
- func (t Tags) Lookup(name string) *Tag
- func (t *Tags) Set(tag string, value string)
- func (t *Tags) SetIfNotFound(tag string, value string)
- func (t *Tags) SetTag(aTag *Tag)
- func (t Tags) Stringify() string
- type Values
Constants ¶
const TagName = "tag"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tags ¶
type Tags []*Tag
Tags represents tags
func Parse ¶ added in v0.4.0
Parse parses an entire Go struct-tag literal. Unlike NewTags it rejects a malformed suffix and returns no usable prefix when parsing fails. Repeated tag names are retained; their semantics belong to the consuming owner.
func (Tags) Literal ¶ added in v0.4.0
Literal renders a complete Go struct-tag literal, retaining explicitly empty values. Stringify keeps its historical omission behavior for existing users.
func (*Tags) SetIfNotFound ¶
type Values ¶
type Values string
Values represents tag values
func (Values) MatchPairs ¶
MatchPairs matches pairs separated by commas, decoding Go-quoted values.
func (Values) MatchRawPairs ¶ added in v0.4.0
MatchRawPairs uses the same pair tokenizer as MatchPairs but preserves value delimiters. Callers can retain SQL identifier quoting without reparsing tags.