package main

import (
	"net/http"
)

type helloHandler struct{}

func (h *helloHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	w.Write([]byte("Hello, world!DAVID!"))
}

func main() {
	http.Handle("/", &helloHandler{})
	http.ListenAndServe(":12345", nil)
}

http://127.0.0.1:12345

相关文章:

  • 2022-12-23
  • 2022-02-12
  • 2021-10-15
  • 2021-12-17
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2022-03-06
猜你喜欢
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2021-07-09
  • 2022-02-12
  • 2021-12-02
  • 2022-12-23
相关资源
相似解决方案