| 1 | package tasklogscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/ |
| 2 | |
| 3 | import ( |
| 4 | "fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/" |
| 5 | "timescip-go gomod github.com/golang/go/src go1.25.0 time/" |
| 6 | ) |
| 7 | |
| 8 | // WaitingTask represents a task for which the total number of items to do work |
| 9 | // is on is unknown. |
| 10 | type WaitingTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask# struct { |
| 11 | // ch is used to transmit task updates. |
| 12 | chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#ch. chan *Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update# |
| 13 | } |
| 14 | |
| 15 | // NewWaitingTask returns a new *WaitingTask. |
| 16 | func NewWaitingTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/NewWaitingTask().(msg string) *WaitingTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask# { |
| 17 | ch := make(chan *Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#, 1) |
| 18 | ch <- &Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#{ |
| 19 | Sscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#S.: fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Sprintf().("%s: ...", msg), |
| 20 | Atscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#At.: timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().(), |
| 21 | } |
| 22 | |
| 23 | return &WaitingTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#{chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#ch.: ch} |
| 24 | } |
| 25 | |
| 26 | // Complete marks the task as completed. |
| 27 | func (w *WaitingTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#) Completescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#Complete().() { |
| 28 | close(w.chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#ch.) |
| 29 | } |
| 30 | |
| 31 | // Updates implements the Task.Updates function and returns a channel of updates |
| 32 | // to log to the sink. |
| 33 | func (w *WaitingTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#) Updatesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#Updates().() <-chan *Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update# { |
| 34 | return w.chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#ch. |
| 35 | } |
| 36 | |
| 37 | // Throttled implements Task.Throttled and returns true, indicating that this |
| 38 | // task is Throttled. |
| 39 | func (w *WaitingTaskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#) Throttledscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/WaitingTask#Throttled().() bool { return true } |