package main
import (
"io"
"net/http"
)
type MyHandler struct{}
func (this MyHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) {
io.WriteString(response, "hello world")
}
func main() {
http.ListenAndServe(":8080", MyHandler{})
}
Go:HttpServer
最新推荐文章于 2023-12-02 21:45:56 发布