MCPcopy Create free account
hub / github.com/PacktPublishing/System-Programming-Essentials-with-Go / handler

Function handler

ch10/http-server/main.go:8–10  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

6)
7
8func handler(w http.ResponseWriter, r *http.Request) {
9 fmt.Fprintf(w, "Hello, you've requested: %s\n", r.URL.Path)
10}
11
12func main() {
13 http.HandleFunc("/", handler)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected