uniq

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package uniq keeps track of "thing" that are either "todo" or "done". Multiple identical events will only be processed once.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type U

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

U keeps track of item to be done.

func New

func New() U

New returns a new initialized U.

func (U) ForEach

func (u U) ForEach() error

ForEach iterates over u and executes f for each element that is 'todo' and sets it to 'done'.

func (U) Set

func (u U) Set(key string, f func() error)

Set sets function f in U under key. If the key already exists it is not overwritten.

func (U) Unset

func (u U) Unset(key string)

Unset removes the key.

Jump to

Keyboard shortcuts

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