refactor(downloader): improve structure and readability
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package downloader
|
||||
|
||||
func handleError(err error) downloadResult {
|
||||
if path, ok := IsSkipError(err); ok {
|
||||
return downloadResult{
|
||||
skipped: true,
|
||||
path: path,
|
||||
}
|
||||
}
|
||||
|
||||
return downloadResult{
|
||||
success: false,
|
||||
err: err,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user