Documentation ¶
Overview ¶
Tags packages have simple data structures and functions to store and manipulate a list of tags.
Index ¶
- Constants
- Variables
- func CheckTag(tag string) error
- func CheckTags(tags string) error
- type Tags
- func (t *Tags) Add(tag string) error
- func (t *Tags) Compare(tr *Tags) int
- func (t *Tags) Copy() *Tags
- func (t *Tags) DecodeMsgpack(dec *msgpack.Decoder) error
- func (t *Tags) EncodeMsgpack(enc *msgpack.Encoder) error
- func (t *Tags) Exist(target string) bool
- func (t *Tags) Get() string
- func (t *Tags) Len() int
- func (t *Tags) Less(i, j int) bool
- func (t *Tags) Merge(tags *Tags) error
- func (t *Tags) MergeFromStringSlice(slice []string) error
- func (t *Tags) Remove(tag string) error
- func (t *Tags) Replace(s string) error
- func (t *Tags) Same(tr *Tags) bool
- func (t *Tags) String() string
- func (t *Tags) Swap(i, j int)
Constants ¶
View Source
const ErrInvalidTagChar = "invalid tag character"
View Source
const ErrInvalidTagsLength = "list of tags is big"
View Source
const ErrNoTags = "no tags"
View Source
const ErrTagDoesntExit = "tag doesn't exist"
View Source
const ErrTagExist = "tag exist"
View Source
const ErrTagNotFound = "tag not found"
Variables ¶
View Source
var TagStringMax = 3000
View Source
var TagStringMin = 1
Functions ¶
Types ¶
type Tags ¶
type Tags []string
func (*Tags) DecodeMsgpack ¶
func (*Tags) EncodeMsgpack ¶
func (*Tags) MergeFromStringSlice ¶
MergeFromStringSlice merges a slice, unordered and unchecked, into a tags. Check all slice itens in the process.
Click to show internal directories.
Click to hide internal directories.