Created
July 5, 2019 07:11
-
-
Save pei0804/a2f6aac4a4da47d223b98dfc9993ec7d to your computer and use it in GitHub Desktop.
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 ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
type simpleHandler struct{} | |
func (h *simpleHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprint(w, "hello") | |
} | |
func main() { | |
http.Handle("/count", new(simpleHandler)) | |
log.Fatal(http.ListenAndServe(":8080", nil)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment