Documentation
¶
Index ¶
- func DownloadFile(fs afero.Fs, ctx context.Context, url, filePath string, logger *logging.Logger, ...) error
- func DownloadFiles(fs afero.Fs, ctx context.Context, downloadDir string, urls []string, ...) error
- func MakeGetRequest(ctx context.Context, uri string) (*http.Response, error)
- type WriteCounter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
func DownloadFile(fs afero.Fs, ctx context.Context, url, filePath string, logger *logging.Logger, useLatest bool) error
DownloadFile downloads a file from the specified URL and saves it to the given path. If useLatest is true, it overwrites the destination file regardless of its existence.
Types ¶
type WriteCounter ¶
WriteCounter tracks the total number of bytes written and prints download progress.
func (*WriteCounter) PrintProgress ¶
func (wc *WriteCounter) PrintProgress()
PrintProgress displays the download progress in the terminal.
Click to show internal directories.
Click to hide internal directories.