(w http.ResponseWriter, _ *http.Request)
| 941 | } |
| 942 | |
| 943 | func (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 | |
| 950 | func (h *Handler) quit(w http.ResponseWriter, _ *http.Request) { |
| 951 | var closed bool |