Skip to content

Commit

Permalink
Merge pull request git-lfs#2767 from git-lfs/simple-task-constructor
Browse files Browse the repository at this point in the history
tasklog: teach *Logger how to enqueue new `*SimpleTask`'s
  • Loading branch information
ttaylorr authored Dec 5, 2017
2 parents f4bb4d2 + 0cad488 commit 6bffda5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tasklog/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6bffda5

Please sign in to comment.