<commit_before>package format

import (
	"go/format"
	"io"

	"golang.org/x/tools/imports"
)

func FormatTo(w io.Writer, pkg string, data []byte) (int64, error) {
	var err error

	data, err = format.Source(data)
	if err != nil {
		return 0, err<commit_msg>Add comment to the format package types<commit_after>package format

import (
	"go/format"
	"io"

	"golang.org/x/tools/imports"
)

// FormatTo rewrites the source data formatted with corrected importants
// to the provider writer w
func FormatTo(w io.Writer, pkg string, data []byte) (int64, error) {
	var err error

	data, err = format.Source(data)
	if err != nil {
		return 0, err
{'fraction_non_alphanumeric': 0.11930926216640503, 'fraction_numerical': 0.009419152276295133, 'mean_word_length': 3.945736434108527, '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': '2930614', 'n_tokens_mistral': 240, 'n_tokens_neox': 222, 'n_words': 73}