MCPcopy Index your code
hub / github.com/prometheus/prometheus / version

Method version

web/web.go:943–948  ·  view source on GitHub ↗
(w http.ResponseWriter, _ *http.Request)

Source from the content-addressed store, hash-verified

941}
942
943func (h *Handler) version(w http.ResponseWriter, _ *http.Request) {
944 dec := json.NewEncoder(w)
945 if err := dec.Encode(h.versionInfo); err != nil {
946 http.Error(w, fmt.Sprintf("error encoding JSON: %s", err), http.StatusInternalServerError)
947 }
948}
949
950func (h *Handler) quit(w http.ResponseWriter, _ *http.Request) {
951 var closed bool

Callers

nothing calls this directly

Calls 2

EncodeMethod · 0.95
ErrorMethod · 0.65

Tested by

no test coverage detected