概要 この記事はQiita - Go6 Advent Calendar 2019の20日目の記事です。 GolangでHTTPサーバーを立てるコードの詳細を追ってコードリーディングします。 参考実装 コードリーディングしていく実装はこちら。 package main import ( "net/http" ) func main() { mux := http.NewServeMux() handler := new(HelloHandler) mux.Handle("/", handler) s := http.Server{ Addr: ":3000", Handler: mux, } s.ListenAndServe() } type HelloHandler struct{} func (h *HelloHandler) ServeHTTP(w http.ResponseWrite
