<commit_before>package saltboot

import (
	"io/ioutil"
	"log"
	"os"
	"regexp"
	"strconv"
	"strings"
)

func DetermineDNSRecursors(fallbackDNSRecursors []string) []string {
	var dnsRecursors []string
	if dat, err := ioutil.ReadFile("/etc/resolv.conf"); err == nil {
		resolvContent := string(dat)
		log.Printf("[determineDNSRecursors] Loaded /etc/resolv.conf file: %s.", resolvContent)
		r, _ := regexp.Compile("nameserver .*")
		if nameserverLines := r.FindAllString(resolvContent, -1); nameserverLines != nil {
			for _, nameserverLine := range nameserverLines {
				log.Printf("[determineDNSRecursors] Found nameserverline: %s.", nameserverLine)
				dnsRecursor := strings.TrimSpace(strings.Split(nameserverLine, " ")[1])
				log.Printf("[determineDNSRecursors] Parsed DNS recursor: %s.", dnsRecursor)
				if !strings.Contains(dnsRecursor, "127.0.0.1") {
					dnsRecursors = append(dnsRecursors, dnsRecursor)
				}
			}
		}
	} else {
		log.Printf("[containerhandler] Failed to load /etc/resolv.conf")
	}
	if fallbackDNSRecursors != nil {
		dnsRecursors = append(dnsRecursors, fallbackDNSRecursors...)
	}
	return dnsRecursors
}

func DetermineBootstrapPort() int {

	portStr := os.Getenv("SALTBOOT_PORT")
	log.Printf("[determineBootstrapPort] SALTBOOT_PORT: %s", portStr)
	port, err := strconv.Atoi(portStr)
	if err != nil {
		port = 7070
		log.Printf("[determineBootstrapPort] using default port: %s", port)
	}
<commit_msg>Change formatter parameter type to number<commit_after>package saltboot

import (
	"io/ioutil"
	"log"
	"os"
	"regexp"
	"strconv"
	"strings"
)

func DetermineDNSRecursors(fallbackDNSRecursors []string) []string {
	var dnsRecursors []string
	if dat, err := ioutil.ReadFile("/etc/resolv.conf"); err == nil {
		resolvContent := string(dat)
		log.Printf("[determineDNSRecursors] Loaded /etc/resolv.conf file: %s.", resolvContent)
		r, _ := regexp.Compile("nameserver .*")
		if nameserverLines := r.FindAllString(resolvContent, -1); nameserverLines != nil {
			for _, nameserverLine := range nameserverLines {
				log.Printf("[determineDNSRecursors] Found nameserverline: %s.", nameserverLine)
				dnsRecursor := strings.TrimSpace(strings.Split(nameserverLine, " ")[1])
				log.Printf("[determineDNSRecursors] Parsed DNS recursor: %s.", dnsRecursor)
				if !strings.Contains(dnsRecursor, "127.0.0.1") {
					dnsRecursors = append(dnsRecursors, dnsRecursor)
				}
			}
		}
	} else {
		log.Printf("[containerhandler] Failed to load /etc/resolv.conf")
	}
	if fallbackDNSRecursors != nil {
		dnsRecursors = append(dnsRecursors, fallbackDNSRecursors...)
	}
	return dnsRecursors
}

func DetermineBootstrapPort() int {

	portStr := os.Getenv("SALTBOOT_PORT")
	log.Printf("[determineBootstrapPort] SALTBOOT_PORT: %s", portStr)
	port, err := strconv.Atoi(portStr)
	if err != nil {
		port = 7070
		log.Printf("[determineBootstrapPort] using default port: %d", port)
	}

{'fraction_non_alphanumeric': 0.14176511466296038, 'fraction_numerical': 0.008339124391938846, 'mean_word_length': 4.8516260162601625, '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': '5481669', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1088, 'n_words': 203}