summaryrefslogtreecommitdiff
path: root/internal/done.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/done.go')
-rw-r--r--internal/done.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/done.go b/internal/done.go
index 54e5e8e..5ea22a0 100644
--- a/internal/done.go
+++ b/internal/done.go
@@ -17,6 +17,15 @@ func NewDone() *Done {
}
}
+func (d *Done) String() string {
+ select {
+ case <-d.Done():
+ return "Done(yes)"
+ default:
+ return "Done(no)"
+ }
+}
+
// Done returns the done channel (closed when done)
func (d *Done) Done() <-chan struct{} {
return d.ch