(referer string)
| 133 | } |
| 134 | |
| 135 | func WithReferer(referer string) DownloadOption { |
| 136 | return func(c *DownloadConfig) { |
| 137 | c.makeRequestOption.referer = referer |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | func Download(ctx context.Context, c *DownloadConfig, opts ...DownloadOption) error { |
| 142 | partialDir := getPartialDirname(c.Dirname, c.Filename, c.Procs) |