Created
December 29, 2014 19:30
-
-
Save 42wim/247c0466fafd15d77b52 to your computer and use it in GitHub Desktop.
infinite downloader in go ;)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "net/http" | |
| "time" | |
| ) | |
| func main() { | |
| http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { | |
| for { | |
| w.Write([]byte(".")) | |
| w.(http.Flusher).Flush() | |
| time.Sleep(time.Second) | |
| } | |
| }) | |
| http.ListenAndServe(":80", nil) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment