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
Types ¶
type CheckConfig ¶
CheckConfig is a configuration to check download target.
type DownloadConfig ¶
type DownloadOption ¶
type DownloadOption func(c *DownloadConfig)
func WithReferer ¶
func WithReferer(referer string) DownloadOption
func WithUserAgent ¶
func WithUserAgent(ua string) DownloadOption
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"`
Quiet bool
Urls []string
}
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
func (*Pget) ReadyWithOption ¶
type Range ¶
type Range struct {
// contains filtered or unexported fields
}
Range struct for range access
func (Range) BytesRange ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
