MCPcopy Create free account
hub / github.com/dispatchrun/wzprof / serveError

Function serveError

pprof.go:56–64  ·  view source on GitHub ↗
(w http.ResponseWriter, status int, txt string)

Source from the content-addressed store, hash-verified

54}
55
56func serveError(w http.ResponseWriter, status int, txt string) {
57 h := w.Header()
58 h.Set("X-Content-Type-Options", "nosniff")
59 h.Set("X-Go-Pprof", "1")
60 h.Set("Content-Type", "text/plain; charset=utf-8")
61 h.Del("Content-Disposition")
62 w.WriteHeader(status)
63 fmt.Fprintln(w, txt)
64}
65
66type profileEntry struct {
67 Name string

Callers 3

NewHandlerMethod · 0.85
serveProfileFunction · 0.85
HandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected