MCPcopy Index your code
hub / github.com/perkeep/perkeep / ServeHTTP

Method ServeHTTP

pkg/serverinit/serverinit.go:822–834  ·  view source on GitHub ↗
(w http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

820type expvarHandler struct{}
821
822func (expvarHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
823 w.Header().Set("Content-Type", "application/json; charset=utf-8")
824 fmt.Fprintf(w, "{\n")
825 first := true
826 expvar.Do(func(kv expvar.KeyValue) {
827 if !first {
828 fmt.Fprintf(w, ",\n")
829 }
830 first = false
831 fmt.Fprintf(w, "%q: %s", kv.Key, kv.Value)
832 })
833 fmt.Fprintf(w, "\n}\n")
834}
835
836type configHandler struct {
837 c *Config

Callers 3

makeCamliHandlerFunction · 0.45

Calls 1

SetMethod · 0.65

Tested by 2