tagset

package
v0.0.0-...-2ce84b7 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortByIDToString

func SortByIDToString(tags []Tag) string

func ToNames

func ToNames(tags []Tag) (names []string)

Types

type Set

type Set struct {
	Map map[string]string // map[id][name]
}

func NewSet

func NewSet(tags []Tag) *Set

func (*Set) Add

func (set *Set) Add(tag Tag)

func (*Set) Delete

func (set *Set) Delete(tag Tag)

func (*Set) Has

func (set *Set) Has(tag Tag) (ok bool)

func (*Set) Slice

func (set *Set) Slice() (tags []Tag)

type Tag

type Tag struct {
	ID   string
	Name string
}

func SortByID

func SortByID(tags []Tag) []Tag

func TagsFrom

func TagsFrom(tagNames []string) (tags []Tag)

func UniqueSortName

func UniqueSortName(tags []Tag) (result []Tag)

Jump to

Keyboard shortcuts

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