11. net/httpã§Webãµã¼ãããã¦ã package main ! import ( "fmt" "net/http" "log" ) ! func hello(w http.ResponseWriter, r *http.Request) { //fmt.Fprintfã§wã«å ¥ããã®ãã¯ã©ã¤ã¢ã³ãã«åºåããã fmt.Fprintf(w, "Hello World!") } ! func main() { // ã¢ã¯ã»ã¹ã®ã«ã¼ãã£ã³ã°ãè¨å®ãã http.HandleFunc("/", hello) // portãæå®ãã¦èµ·å err := http.ListenAndServe(":9090", nil) if err != nil { log.Fatal("ListenAndServe: ", err) } } 12. net/httpã§Webãµã¼ãããã¦ã packag
{{#tags}}- {{label}}
{{/tags}}