MCPcopy Create free account
hub / github.com/chromedp/examples / testServer

Function testServer

keys/main.go:57–63  ·  view source on GitHub ↗

testServer is a simple HTTP server that displays the passed headers in the html.

(addr string)

Source from the content-addressed store, hash-verified

55
56// testServer is a simple HTTP server that displays the passed headers in the html.
57func testServer(addr string) error {
58 mux := http.NewServeMux()
59 mux.HandleFunc("/", func(res http.ResponseWriter, _ *http.Request) {
60 fmt.Fprint(res, indexHTML)
61 })
62 return http.ListenAndServe(addr, mux)
63}
64
65const indexHTML = `<!doctype html>
66<html>

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected