mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-19 06:43:42 +00:00
丰富单元测试
This commit is contained in:
1 parent
dd47b52952
commit
df2dbca475
6 files changed
+345
-113
No files matched your search
@@ -5,7 +5,6 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/monkeyWie/gopeed/download/common"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -26,7 +25,7 @@ type Downloader struct {
|
||||
}
|
||||
|
||||
func NewDownloader(fetchers ...common.Fetcher) *Downloader {
|
||||
d := &Downloader{Controller: &common.Controller{Files: make(map[string]*os.File)}}
|
||||
d := &Downloader{Controller: common.NewController()}
|
||||
d.fetches = make(map[string]common.Fetcher)
|
||||
for _, f := range fetchers {
|
||||
for _, p := range f.Protocols() {
|
||||
|
||||
Reference in new issue
Block a user