tags

package
v2.46.9 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 3 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 Tags

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

Tags is a helper struct for merging, deleting and deduplicating the tags while preserving the order

func New

func New(ts ...string) *Tags

New creates a Tag struct from a slice of tags, e.g. ["tag1", "tag2"] or a list of tags, e.g. "tag1,tag2"

func (*Tags) Add

func (t *Tags) Add(ts ...string) bool

Add appends a list of new tags and returns true if at least one was appended

func (*Tags) AsList

func (t *Tags) AsList() string

AsList returns the tags converted to a list

func (*Tags) AsSlice

func (t *Tags) AsSlice() []string

AsSlice returns the tags as slice of strings

func (*Tags) Remove

func (t *Tags) Remove(s ...string) bool

Remove removes a list of tags and returns true if at least one was removed

Jump to

Keyboard shortcuts

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