<commit_before>package dogstatsd

import (
	"bytes"
	"fmt"
	"net"
	"time"

	"github.com/go-kit/kit/log"
	"github.com/go-kit/kit/metrics"
	"github.com/go-kit/kit/util/conn"
)

// Emitter is a struct to manage connections and orchestrate the emission of
// metrics to a Statsd process.
type Emitter struct {
	prefix  string
	keyVals chan keyVal
	mgr     *conn.Manager
	logger  log.Logger
	quitc   chan chan struct{}
}

type keyVal struct {
	key string
	val string
}

func stringToKeyVal(key string, keyVals chan keyVal) chan string {
	vals := make(chan string)
	go func() {
		for val := range vals {
			keyVals <- keyVal{key: key, val: val}
		}
	}()
	return vals
}
<commit_msg>dogstatsd docfix<commit_after>package dogstatsd

import (
	"bytes"
	"fmt"
	"net"
	"time"

	"github.com/go-kit/kit/log"
	"github.com/go-kit/kit/metrics"
	"github.com/go-kit/kit/util/conn"
)

// Emitter is a struct to manage connections and orchestrate the emission of
// metrics to a DogStatsd process.
type Emitter struct {
	prefix  string
	keyVals chan keyVal
	mgr     *conn.Manager
	logger  log.Logger
	quitc   chan chan struct{}
}

type keyVal struct {
	key string
	val string
}

func stringToKeyVal(key string, keyVals chan keyVal) chan string {
	vals := make(chan string)
	go func() {
		for val := range vals {
			keyVals <- keyVal{key: key, val: val}
		}
	}()
	return vals
}

{'fraction_non_alphanumeric': 0.11061946902654868, 'fraction_numerical': 0.0, 'mean_word_length': 3.405844155844156, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2106908', 'n_tokens_mistral': 537, 'n_tokens_neox': 507, 'n_words': 149}