code: func Handler(w http.ResponseWriter, r *http.Request) {
  	values := r.URL.Query()
  	for _, c := range []string{"1", "true"} {
  		if values.Get("pp") == c {
  			prettyPrint = true
  		}
  	}
  
  	var jsonBytes []byte
  	var jsonErr error
  	if prettyPrint {
  		jsonBytes, jsonErr = json.MarshalIndent(GetStats(), "", "  ")
  	} else {
  		jsonBytes, jsonErr = json.Marshal(GetStats())
  	}
  	var body string
  	if jsonErr != nil {
  		body = jsonErr.Error()
  	} else {
  		body = string(jsonBytes)
  	}
  
  	if newLineTerm {
  		body += "\n"
  	}
  
  	headers := make(map[string]string)
  	headers["Content-Type"] = "application/json"
  	headers["Content-Length"] = strconv.Itoa(len(body))
  	for name, value := range headers {
  		w.Header().Set(name, value)
  	}
  
  	if jsonErr != nil {
  		w.WriteHeader(http.StatusInternalServerError)
  	} else {
  		w.WriteHeader(http.StatusOK)
  	}
  
  	io.WriteString(w, body)
  }
docs: // Handler returns activity status of Go.