mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-19 23:03:43 +00:00
docs: add example
This commit is contained in:
1 parent
01501ca857
commit
936e193c20
10 files changed
+120
-143
No files matched your search
@@ -53,8 +53,8 @@ func TestDownloader_Create(t *testing.T) {
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
downloader.Listener(func(taskInfo *TaskInfo, eventKey EventKey) {
|
||||
if eventKey == EventKeyDone {
|
||||
downloader.Listener(func(event *Event) {
|
||||
if event.Key == EventKeyDone {
|
||||
wg.Done()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user