<commit_before>package updater

import (
	"TOGY/config"
	"encoding/json"
	"io"
	"net/http"
)

type Info struct {
	Broadcast bool
	FileType  string
	Config    bool
}

func GetInfo(c *config.Config) (i Info, err error) {
	r, err := downloadInfo(c.UpdateURL + "/update?client=" + c.Name)
	if err != nil {
		return
	}
	defer r.Close()

	return parseInfo(r)
}

func downloadInfo(url string) (io.ReadCloser, error) {
	resp, err := http.Get(url)
	if err != nil {
		return nil, err
	}
	return resp.Body, nil
}

func parseInfo(r io.Reader) (i Info, err error) {
	d := json.NewDecoder(r)
	err = d.Decode(&i)
	return
}

func AnnounceBroadcast(c *config.Config) error {
	url := c.UpdateURL + "/presentation/active/downloadComplete?client=" + c.Name
	_, err := http.Get(url)
	return err
}

func AnnounceConfig(c *config.Config) error {
	url := c.UpdateURL + "/cofig/downloadComplete?client=" + c.Name
	_, err := http.Get(url)
	return err
}
<commit_msg>Removed an intentional typo from the final version<commit_after>package updater

import (
	"TOGY/config"
	"encoding/json"
	"io"
	"net/http"
)

type Info struct {
	Broadcast bool
	FileType  string
	Config    bool
}

func GetInfo(c *config.Config) (i Info, err error) {
	r, err := downloadInfo(c.UpdateURL + "/update?client=" + c.Name)
	if err != nil {
		return
	}
	defer r.Close()

	return parseInfo(r)
}

func downloadInfo(url string) (io.ReadCloser, error) {
	resp, err := http.Get(url)
	if err != nil {
		return nil, err
	}
	return resp.Body, nil
}

func parseInfo(r io.Reader) (i Info, err error) {
	d := json.NewDecoder(r)
	err = d.Decode(&i)
	return
}

func AnnounceBroadcast(c *config.Config) error {
	url := c.UpdateURL + "/presentation/active/downloadComplete?client=" + c.Name
	_, err := http.Get(url)
	return err
}

func AnnounceConfig(c *config.Config) error {
	url := c.UpdateURL + "/config/downloadComplete?client=" + c.Name
	_, err := http.Get(url)
	return err
}

{'fraction_non_alphanumeric': 0.1440501043841336, 'fraction_numerical': 0.0, 'mean_word_length': 3.8654822335025383, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2078627', 'n_tokens_mistral': 730, 'n_tokens_neox': 716, 'n_words': 185}