This command-line tool calculates MD5 hash of the content of Web pages in a concurrent way.
A list of URLs
A user can specify optional -parallel flag, which specifies how many concurrent requests are permitted. Default value is 10
go run main.go google.com facebook.com yahoo.com
go run main.go -parallel 2 google.com facebook.com yahoo.com
This tool implements pipeline architecture, meaning that the process is separated into 3 steps.
First step: Get content - The Program will fetch the content of provided URLs in a concurrent way.
Second step: Calculate hash - Hash will be calculated from obtained content.
Third step: Print result - At the final stage the calculated hashes will be printed to the standard output.
This program doesn't have any long-running parts; there are no consequences of error occurence,
except the fact that hash won't be calculated in case the content wasn't obtained.
Errors are included in Content and Hash structures, feel free to log/handle them as needed.