ci: auto release

This commit is contained in:
liwei committed 2021-03-26 16:23:24 +08:00
1 parent 936e193c20
commit d3c5dafd3e
4 files changed
+115

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
package main
import (
"fmt"
"github.com/monkeyWie/gopeed-core/pkg/base"
"github.com/monkeyWie/gopeed-core/pkg/download"
)
func main() {
finallyCh := make(chan error)
err := download.Boot().
URL("https://www.baidu.com/index.html").
Listener(func(event *download.Event) {
if event.Key == download.EventKeyFinally {
finallyCh <- event.Err
}
}).
Create(&base.Options{
Connections: 8,
})
if err != nil {
panic(err)
}
err = <-finallyCh
if err != nil {
fmt.Printf("download fail:%v\n", err)
} else {
fmt.Println("download success")
}
}