Created
July 5, 2019 07:11
-
-
Save pei0804/a2f6aac4a4da47d223b98dfc9993ec7d to your computer and use it in GitHub Desktop.
Revisions
-
pei0804 created this gist
Jul 5, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ 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)) }