From 0cad488c23350ff35f969980753bf9798071942e Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Mon, 4 Dec 2017 12:09:00 -0800 Subject: [PATCH] tasklog: teach *Logger how to enqueue new `*SimpleTask`'s --- tasklog/log.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasklog/log.go b/tasklog/log.go index 05fb0bc2db..4462e10d08 100644 --- a/tasklog/log.go +++ b/tasklog/log.go @@ -101,6 +101,14 @@ func (l *Logger) List(msg string) *ListTask { return t } +// List creates and enqueues a new *SimpleTask. +func (l *Logger) Simple() *SimpleTask { + t := NewSimpleTask() + l.Enqueue(t) + + return t +} + // Enqueue enqueues the given Tasks "ts". func (l *Logger) Enqueue(ts ...Task) { if l == nil {