Created
October 15, 2017 15:48
-
-
Save avelino/c8e8bc86e79335d9a9b10ff35fc75b5f to your computer and use it in GitHub Desktop.
This file contains 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
// 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