Skip to content

Instantly share code, notes, and snippets.

@avelino
Created October 15, 2017 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avelino/c8e8bc86e79335d9a9b10ff35fc75b5f to your computer and use it in GitHub Desktop.
Save avelino/c8e8bc86e79335d9a9b10ff35fc75b5f to your computer and use it in GitHub Desktop.
// https://avelino.xxx/go-vs-python-more-request-per-second/
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", viewHandler)
http.ListenAndServe(":8080", nil)
}
func viewHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-type", "text/plain")
fmt.Fprintf(w, "Hello World")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment