tags

package
v0.0.0-...-cf07509 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: GPL-3.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinValue

func JoinValue(group, name string) string

func SplitValue

func SplitValue(value string) (group, name string)

Types

type Tags

type Tags struct {
	// contains filtered or unexported fields
}

func New

func New(values []string) *Tags

func NewFromString

func NewFromString(input string) *Tags

func (*Tags) Add

func (self *Tags) Add(group, name string)

func (*Tags) AddValue

func (self *Tags) AddValue(value string)

func (*Tags) Delete

func (self *Tags) Delete(group, name string)

func (*Tags) DeleteGroup

func (self *Tags) DeleteGroup(group string)

func (*Tags) DeleteValue

func (self *Tags) DeleteValue(value string)

func (*Tags) Get

func (self *Tags) Get(group string, separate bool) []string

func (*Tags) GetSingle

func (self *Tags) GetSingle(group string, separate bool) (string, bool)

func (*Tags) Have

func (self *Tags) Have(group, name string) bool

func (*Tags) HaveGroup

func (self *Tags) HaveGroup(group string) bool

func (*Tags) HaveValue

func (self *Tags) HaveValue(value string) bool

func (*Tags) Map

func (self *Tags) Map() map[string]([]string)

func (*Tags) SetSingle

func (self *Tags) SetSingle(group, name string)

func (*Tags) SetSingleValue

func (self *Tags) SetSingleValue(value string)

NOTE: adding value which not contains group, will first delete all other

values which have no group

func (*Tags) String

func (self *Tags) String() string

func (*Tags) Values

func (self *Tags) Values() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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