<commit_before>package tumblr

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"strings"
)

// This method GET requests a URL and unmarshals it based on a specified blank struct
// url - The GET URL
// responseObject - A pointer to the blank struct type
func (api Tumblr) info(url string, responseObject interface{}) {
	response := api.get(url)
	if response.Meta.Status != 200 {
		log.Fatalln(fmt.Sprintf("http get error: response status %d with %s",
			response.Meta.Status, response.Meta.Msg))
	}

	err := json.Unmarshal(response.Response, &responseObject)
	if err != nil {
		log.Fatalln(err)
	}
}

// This method GET requests only returning the []byte found
// url - The GET URL
func (api Tumblr) rawGet(url string) []byte {
	request, err := http.NewRequest("GET", url, nil)

	if err != nil {
		log.Fatalln(err)
	}

	api.oauthService.Sign(request, &api.config)
	client := new(http.Client)
	clientResponse, err := client.Do(request)

	if err != nil {
		log.Fatalln(err)
	}
	defer clientResponse.Body.Close()

	body, err := ioutil.ReadAll(clientResponse.Body)
	if err != nil {
		log.Fatalln(err)
	}

	return body
}<commit_msg>no need for fatal error when json.Unmarshal fails<commit_after>package tumblr

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"strings"
)

// This method GET requests a URL and unmarshals it based on a specified blank struct
// url - The GET URL
// responseObject - A pointer to the blank struct type
func (api Tumblr) info(url string, responseObject interface{}) {
	response := api.get(url)
	if response.Meta.Status != 200 {
		log.Fatalln(fmt.Sprintf("http get error: response status %d with %s",
			response.Meta.Status, response.Meta.Msg))
	}

	err := json.Unmarshal(response.Response, &responseObject)
	if err != nil {
		//log.Println(string(response.Response))
		// Looks like sometimes source_title is being returned as "false"
		// and marshaller freaks because it should be a string.
		//log.Fatalln(err)
		log.Println("Gumblr marshalling failure.")
	}
}

// This method GET requests only returning the []byte found
// url - The GET URL
func (api Tumblr) rawGet(url string) []byte {
	request, err := http.NewRequest("GET", url, nil)

	if err != nil {
		log.Fatalln(err)
	}

	api.oauthService.Sign(request, &api.config)
	client := new(http.Client)
	clientResponse, err := client.Do(request)

	if err != nil {
		log.Fatalln(err)
	}
	defer clientResponse.Body.Close()

	body, err := ioutil.ReadAll(clientResponse.Body)
	if err != nil {
		log.Fatalln(err)
	}

	return body
}
{'fraction_non_alphanumeric': 0.13139260424862312, 'fraction_numerical': 0.0023603461841070024, 'mean_word_length': 3.816287878787879, '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': '4568609', 'n_tokens_mistral': 919, 'n_tokens_neox': 865, 'n_words': 259}