uniq

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 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 for u 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) SetTodo

func (u U) SetTodo(key string)

SetTodo sets key to 'todo' again.

func (U) Unset

func (u U) Unset(key string)

Unset removes the 'todo' associated with a key

Jump to

Keyboard shortcuts

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