MCPcopy Create free account
hub / github.com/Apress/pro-go / ServeHTTP

Method ServeHTTP

24 - HTTP Servers/httpserver/main.go:13–17  ·  view source on GitHub ↗
(writer http.ResponseWriter, 
        request *http.Request)

Source from the content-addressed store, hash-verified

11}
12
13func (sh StringHandler) ServeHTTP(writer http.ResponseWriter,
14 request *http.Request) {
15 Printfln("Request for %v", request.URL.Path)
16 io.WriteString(writer, sh.message)
17}
18
19func HTTPSRedirect(writer http.ResponseWriter,
20 request *http.Request) {

Callers

nothing calls this directly

Calls 1

PrintflnFunction · 0.70

Tested by

no test coverage detected