NewDownloader 创建下载器
()
| 24 | |
| 25 | // NewDownloader 创建下载器 |
| 26 | func NewDownloader() *Downloader { |
| 27 | return &Downloader{ |
| 28 | timeout: 30 * time.Second, |
| 29 | retries: 3, |
| 30 | retryDelay: 2 * time.Second, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // printTimestampedMessage 打印带时间戳的消息 |
| 35 | func printTimestampedMessage(format string, args ...interface{}) { |