Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader interface {
Download(uri string)
}
func NewFTPDownloader ¶
func NewFTPDownloader() Downloader
func NewHTTPDownloader ¶
func NewHTTPDownloader() Downloader
type FTPDownloader ¶
type FTPDownloader struct {
// contains filtered or unexported fields
}
Example ¶
var downloader Downloader = NewFTPDownloader() downloader.Download("ftp://example.com/abc.zip")
Output: prepare downloading download ftp://example.com/abc.zip via ftp default save finish downloading
type HTTPDownloader ¶
type HTTPDownloader struct {
// contains filtered or unexported fields
}
Example ¶
var downloader Downloader = NewHTTPDownloader() downloader.Download("http://example.com/abc.zip")
Output: prepare downloading download http://example.com/abc.zip via http http save finish downloading
Click to show internal directories.
Click to hide internal directories.