Documentation ¶
Index ¶
- type Tagger
- func (ts *Tagger) AddTags(tags []string) error
- func (ts *Tagger) GetData() map[string]interface{}
- func (ts *Tagger) ListTags() ([]string, error)
- func (ts *Tagger) RemoveTags(tags []string, removeEmptyTagArrays bool) error
- func (ts *Tagger) RemoveUnknownTags(knownTags []string, removeEmptyTagArrays bool) error
- func (ts *Tagger) SetData(data map[string]interface{})
- func (ts *Tagger) SetSelectors(selectors []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tagger ¶
type Tagger struct {
// contains filtered or unexported fields
}
func (*Tagger) AddTags ¶
AddTags adds the listed tags to any entity selected. The tags are added in the order they are listed.
func (*Tagger) ListTags ¶
ListTags returns a list of the tags in use in the data. The tags are sorted.
func (*Tagger) RemoveTags ¶
RemoveTags removes the listed tags from any entity selected. Empty tag arrays are removed if 'removeEmptyTagArrays' is true. The order of the remaining tags is preserved.
func (*Tagger) RemoveUnknownTags ¶
RemoveUnknownTags removes all tags that are not in the list of known tags. If removeEmptyTagArrays is true, it will also remove any empty tags arrays.
func (*Tagger) SetData ¶
SetData sets the Yaml document to operate on. Cannot be set to nil (panic).
func (*Tagger) SetSelectors ¶
SetSelectors sets the selectors to use. If empty (or nil), the default selectors are set.