<commit_before>package main

import (
	"crypto/tls"
	"fmt"
	"github.com/SpiritOfStallman/herots"
	//"io/ioutil"
)

func main() {
	var err error

	//ca, _ := ioutil.ReadFile("certs/ca.pem")
	//key, _ := ioutil.ReadFile("certs/ca.key")

	herald := herots.NewServer()

	optinons := &herots.HerotsSrvOptions{
		//Host: "127.0.0.1",
		Host:        "localhost",
		Port:        9000,
		MessageLvl:  3,
		TlsAuthType: tls.RequireAndVerifyClientCert,
		//TlsAuthType: tls.RequireAnyClientCert,
		//TlsAuthType: tls.VerifyClientCertIfGiven,
	}
	herald.SetOptions(optinons)

	err = herald.LoadKeyPair([]byte(certPem), []byte(pkey))
	if err != nil {
		fmt.Println(err)
		return
	}

	//err = herald.LoadRootCaCert([]byte(certPem))
	//if err != nil {
	//	fmt.Println(err)
	//	return
	//}

	err = herald.Start()
	if err != nil {
		fmt.Println(err)
		return
	}

	for {<commit_msg>fix example after refactoring<commit_after>package main

import (
	"crypto/tls"
	"fmt"
	"github.com/SpiritOfStallman/herots"
	//"io/ioutil"
)

func main() {
	var err error

	//ca, _ := ioutil.ReadFile("certs/ca.pem")
	//key, _ := ioutil.ReadFile("certs/ca.key")

	herald := herots.NewServer()

	optinons := &herots.Options{
		//Host: "127.0.0.1",
		Host:         "localhost",
		Port:         9000,
		MessageLevel: 3,
		TLSAuthType:  tls.RequireAndVerifyClientCert,
		//TLSAuthType: tls.RequireAnyClientCert,
		//TLSAuthType: tls.VerifyClientCertIfGiven,
	}
	herald.Config(optinons)

	err = herald.LoadKeyPair([]byte(certPem), []byte(pkey))
	if err != nil {
		fmt.Println(err)
		return
	}

	//err = herald.LoadRootCaCert([]byte(certPem))
	//if err != nil {
	//	fmt.Println(err)
	//	return
	//}

	err = herald.Start()
	if err != nil {
		fmt.Println(err)
		return
	}

	for {
{'fraction_non_alphanumeric': 0.17060518731988472, 'fraction_numerical': 0.012680115273775217, 'mean_word_length': 3.297029702970297, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3794069', 'n_tokens_mistral': 781, 'n_tokens_neox': 734, 'n_words': 119}