tag

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tag implements an [actions.Runner] that manages tags in a notification.

Tags are stored sorted and unique.

It takes as arguments the tags to add prefixed by `+` and the tags to remove prefixed by `-`. If a tag is not prefixed, it is added.

E.g.: `tag0 -tag1 +tag2` will add `tag0` and `tag2` and remove `tag1`.

Adding an existing tag is a no-op. Removing a missing tag is a no-op.

Usage in the config:

rules:
  - action: tag
    args: [+tag0, -tag1]

Usage in the REPL:

:tag +tag0 -tag1

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct{}

func (*Runner) Run

func (*Runner) Run(n *notifications.Notification, tags []string, w io.Writer) error

Jump to

Keyboard shortcuts

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