Help us shape the future of Go! Take the 2026 Go Developer Survey

tags

package
v2.52.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 1 Imported by: 3

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