package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello, World!")
})
fmt.Println("Please Visit - http://localhost:8888/")
http.ListenAndServe(":8888", nil)
}
标签:http,fmt,helloworld,网页,func,8888,main
From: https://www.cnblogs.com/wangend/p/17062843.html