uniq

package
Version: v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2019 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, o interface{}) interface{}

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

func (U) Unset added in v1.2.1

func (u U) Unset(key string)

Unset removes the key.

Source Files

Jump to

Keyboard shortcuts

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