Created
May 11, 2022 14:20
-
-
Save aoisensi/45603cf7b7b330e94bf432f9794d492f 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 ( | |
"net/http" | |
"strconv" | |
) | |
var counter int | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { | |
counter++ | |
w.Write([]byte("あなたは" + strconv.Itoa(counter) + "人目の訪問者です")) | |
}) | |
http.ListenAndServe(":8080", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment