code: func HTTPReply(w http.ResponseWriter, r *HTTPResult, j *JSONOutput) (int, error) {
  	var response []byte
  	if j.enable {
  		w.Header().Set("Content-Type", "application/json")
  		var err error
  		if j.prettyPrint {
  			response, err = json.MarshalIndent(r, "", "  ")
  			if err != nil {
  				response, _ = json.MarshalIndent(FailCommand(err), "", "  ")
  			}
  		} else {
  			response, err = json.Marshal(r)
  			if err != nil {
  				response, _ = json.Marshal(FailCommand(err))
  			}
  		}
  	} else {
  		response = []byte(r.String())
  	}
  	return fmt.Fprint(w, string(response))
  }
docs: // HTTPReply helper function that takes care of sending the message out