mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
* Drop multi-threaded downloader. It doesn't really belong here - some places require it, some do not, but it's definitely not the right place to handle it, as it's being used only when updating mirrors * Pass expectedChecksums as pointer, so it's easy to drive `nil` value, and also downloader can fill back checksums (not implemented right now). * Break down downloader and tests into more files * Use pkg/errors instead of fmt
18 lines
305 B
Go
18 lines
305 B
Go
// Package http provides all HTTP (and FTP)-related operations
|
|
package http
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// Error is download error connected to HTTP code
|
|
type Error struct {
|
|
Code int
|
|
URL string
|
|
}
|
|
|
|
// Error
|
|
func (e *Error) Error() string {
|
|
return fmt.Sprintf("HTTP code %d while fetching %s", e.Code, e.URL)
|
|
}
|