DownloadFile retrieves a file with retry logic, optional progress bar, and SHA256 verification.
(destPath string, fileURL string, progressBar bool, shaSumURL string)
| 22 | |
| 23 | // DownloadFile retrieves a file with retry logic, optional progress bar, and SHA256 verification. |
| 24 | func DownloadFile(destPath string, fileURL string, progressBar bool, shaSumURL string) (err error) { |
| 25 | return DownloadFileExtended(destPath, fileURL, progressBar, shaSumURL, 2, 20*time.Minute) |
| 26 | } |
| 27 | |
| 28 | // DownloadFileExtended retrieves a file with retry logic, optional progress bar, and SHA256 verification. |
| 29 | // It allows specifying the number of retries and timeout duration. |