tags

package
v0.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 8 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func (ts *Tagger) AddTags(tags []string) error

AddTags adds the listed tags to any entity selected. The tags are added in the order they are listed.

func (*Tagger) GetData

func (ts *Tagger) GetData() map[string]interface{}

GetData returns the (modified) document.

func (*Tagger) ListTags

func (ts *Tagger) ListTags() ([]string, error)

ListTags returns a list of the tags in use in the data. The tags are sorted.

func (*Tagger) RemoveTags

func (ts *Tagger) RemoveTags(tags []string, removeEmptyTagArrays bool) error

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

func (ts *Tagger) RemoveUnknownTags(knownTags []string, removeEmptyTagArrays bool) error

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

func (ts *Tagger) SetData(data map[string]interface{})

SetData sets the Yaml document to operate on. Cannot be set to nil (panic).

func (*Tagger) SetSelectors

func (ts *Tagger) SetSelectors(selectors []string) error

SetSelectors sets the selectors to use. If empty (or nil), the default selectors are set.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL