03-http-Handle

command
v0.0.0-...-228c668 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 4 Imported by: 0

README

  1. Take the previous program and change it so that:
  • func main uses http.Handle instead of http.HandleFunc

Contstraint: Do not change anything outside of func main

Hints:

http.HandlerFunc

type HandlerFunc func(ResponseWriter, *Request)

http.HandleFunc

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

source code for HandleFunc

  func (mux *ServeMux) HandleFunc(pattern string, handler func(ResponseWriter, *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