网页版helloworld

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)
}
posted @ 2023-01-20 16:06  mingtian是吧  阅读(236)  评论(0编辑  收藏  举报