tags

package
v0.0.0-...-e69bfbc Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoAttr = errors.New("no such attribute")

ErrNoAttr is returned when a file has no extended attribute.

Functions

func Write

func Write(path string, tagset Set) error

Write sets the tagset for the file at paths.

Types

type Set

type Set map[string]struct{}

Set is an unordered set of tags.

func Read

func Read(path string) (Set, error)

Read returns a tagset for the file at path.

func (Set) Add

func (ts Set) Add(tags ...string) Set

Add tags to the tagset.

func (Set) Iter

func (ts Set) Iter() iter.Seq[string]

Iter returns an iterator over the tagset.

func (Set) Remove

func (ts Set) Remove(tags ...string) Set

Remove tags from the tagset.

func (Set) ToBytes

func (ts Set) ToBytes() ([]byte, error)

ToBytes converts the tagset to CSV bytes.

Jump to

Keyboard shortcuts

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