Skip to content

Instantly share code, notes, and snippets.

@42wim
Created December 29, 2014 19:30
Show Gist options
  • Select an option

  • Save 42wim/247c0466fafd15d77b52 to your computer and use it in GitHub Desktop.

Select an option

Save 42wim/247c0466fafd15d77b52 to your computer and use it in GitHub Desktop.
infinite downloader in go ;)
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