downloader
Description
Applies IMT Hash to the data of a downloaded file. Writes the result in a file (hexData.txt) as a hex string in the provided path. Throttling is applied if specified.
Requirements
Go 1.16
Documentation
The following examples uses a url containing a file with a long string of characters. Change the url as required:
Check the available CLI options:
make usage
returns:
Usage:
downloader hash [flags]
Flags:
-h, --help help for hash
-p, --path string The path where the processed data will be written
-t, --throttling If throttling will be applied to the download (10 bytes per second)
-u, --url string The URL from which the file will be downloaded
Do a quick run:
make run
Do a quick run with throttling:
make throt
Check the written data:
make check
Do a quick run using Docker:
make docker-build
Or run it directly with the main.go file:
go run main.go hash --url "https://raw.githubusercontent.com/ebarrera89/files/main/numbers" --path "/tmp"