Add support to mirror non package installer files

This commit is contained in:
Oliver Sauder
2017-11-23 14:22:41 +01:00
parent 9a704de43b
commit 108b0ea226
35 changed files with 593 additions and 153 deletions
+11
View File
@@ -3,6 +3,7 @@ package http
import (
"fmt"
"net/url"
)
// Error is download error connected to HTTP code
@@ -15,3 +16,13 @@ type Error struct {
func (e *Error) Error() string {
return fmt.Sprintf("HTTP code %d while fetching %s", e.Code, e.URL)
}
// NoCandidateFoundError indicates that now candidate of given url could be found
type NoCandidateFoundError struct {
URL *url.URL
}
// Error message
func (e *NoCandidateFoundError) Error() string {
return fmt.Sprintf("no candidates for %s found", e.URL)
}