package
0.0.0-20210726165104-42ea4af6fad4
Repository: https://github.com/chenyendu/gowebdev.git
Documentation: pkg.go.dev

# README

Take the previous program and change it so that:

  • func main uses http.Handle instead of http.HandleFunc

Contstraint: Do not change anything outside the func main

Hints:

http.HandlerFunc

type HandlerFunc func(ResponseWriter, *Request)

http.HandleFunc

func HandleFunc(pattern string, handler func(ResponseWrite, *Request))

source code for HandleFunc

func (mux *ServeMux) HandleFunc(pattern string, handler func(ReqponseWriter, *Request)) {
    mux.Handle(pattern, HandlerFunc(handler))
}