03_hands-on

command
v0.0.0-...-42ea4af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 4 Imported by: 0

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))
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL