mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-16 12:08:04 +00:00
New upstream version 1.4.0+ds1
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user