Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Download ¶
func Download(ctx context.Context, c *DownloadConfig, opts ...DownloadOption) error
Download ...
Types ¶
type CheckConfig ¶
CheckConfig is a configuration to check download target.
type DownloadConfig ¶
type DownloadConfig struct {
Filename string
Dirname string
ContentLength int64
Procs int
URLs []string
Client *http.Client
// contains filtered or unexported fields
}
DownloadConfig ...
type Options ¶
type Options struct {
Help bool `short:"h" long:"help"`
NumConnection int `short:"p" long:"procs" default:"1"`
Output string `short:"o" long:"output"`
Timeout int `short:"t" long:"timeout" default:"10"`
UserAgent string `short:"u" long:"user-agent"`
Referer string `short:"r" long:"referer"`
Update bool `long:"check-update"`
Trace bool `long:"trace"`
}
Options struct for parse command line arguments
type Pget ¶
type Pget struct {
Trace bool
Output string
Procs int
URLs []string
// contains filtered or unexported fields
}
Pget structs
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
