<commit_before>package glapi

import (
  "encoding/json"
  "fmt"
  "net/http"
)

type Response struct {
  RawResponse http.ResponseWriter
}

func (res *Response) Send(r interface{}) {

  switch str := r.(type) {
  case string:
    res.SendText(str)
    return
  }

  res.SendJson(r)
}

func (res *Response) SendText(text string) {
  fmt.Fprintf(res.RawResponse, text)
}

func (res *Response) SendJson(r interface{}) {
  j, _ := json.MarshalIndent(r, "", "  ")
  res.SendText(string(j[:]))
}<commit_msg>Made send methods in Response private.<commit_after>package glapi

import (
  "encoding/json"
  "fmt"
  "net/http"
)

type Response struct {
  RawResponse http.ResponseWriter
}

func (res *Response) Send(r interface{}) {

  switch str := r.(type) {
  case string:
    res.sendText(str)
    return
  }

  res.sendJson(r)
}

func (res *Response) sendText(text string) {
  fmt.Fprintf(res.RawResponse, text)
}

func (res *Response) sendJson(r interface{}) {
  j, _ := json.MarshalIndent(r, "", "  ")
  res.sendText(string(j[:]))
}
{'fraction_non_alphanumeric': 0.1564625850340136, 'fraction_numerical': 0.0, 'mean_word_length': 3.7906976744186047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6663074', 'n_tokens_mistral': 381, 'n_tokens_neox': 374, 'n_words': 83}