diff options
Diffstat (limited to 'plugin/pkg/uniq')
-rw-r--r-- | plugin/pkg/uniq/uniq.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/pkg/uniq/uniq.go b/plugin/pkg/uniq/uniq.go index 3e50d64b5..6dd74883d 100644 --- a/plugin/pkg/uniq/uniq.go +++ b/plugin/pkg/uniq/uniq.go @@ -24,6 +24,13 @@ func (u U) Set(key string, f func() error) { u.u[key] = item{todo, f} } +// Unset removes the 'todo' associated with a key +func (u U) Unset(key string) { + if _, ok := u.u[key]; ok { + delete(u.u, key) + } +} + // SetTodo sets key to 'todo' again. func (u U) SetTodo(key string) { v, ok := u.u[key] |