git
ask
hub
Privacy
Terms
Sign in with GitHub
jakecoffman/concurrent_download_challenge
↗
Language ·
Go
Simplify and Visualize This Repo
Scan the safety of this repo
Self Host this repo
Check out more work of Developer: jakecoffman
Ask anything about this repo to start.
Write a Go program that concurrently downloads Google, Python.org, Ruby-Lang.org, and Golang.org, printing each site's URL, page size in bytes, and download time, with a 500ms overall deadline that abandons remaining downloads.
Help me structure this Go concurrent download solution using goroutines and a timeout so that if any download exceeds the half-second limit the program stops gracefully and prints total elapsed time.
How do I use Go's context package or time.After to enforce a 500ms deadline across four concurrent HTTP fetches and cancel any that do not finish in time?
Generate Go test cases for this concurrent download challenge to verify that the program always prints total elapsed time even when websites are slow or unreachable within the deadline.
Full explanation on explaingit →
📎
Send
By chatting or signing in you agree to the
Terms
and chat-message logging (revocable in
History
).