<commit_before>// 24 september 2014

package main

import (
	"flag"
	"runtime"
	"os"
	"path/filepath"
	"strings"
	"sort"
)

var targetOS = flag.String("os", runtime.GOOS, "select target OS; list for a list of supported OSs")
var targetArch = flag.String("arch", runtime.GOARCH, "select target architecture; list for a list of supported architectures")

func targetName() string {
	pwd, err := os.Getwd()
	if err != nil {
		// TODO
		panic(err)
	}
	target := filepath.Base(pwd)
	if *targetOS == "windows" {
		target += ".exe"
	}
	return target
}

var supportedOSs = strings.Fields("windows darwin linux freebsd openbsd netbsd dragonfly solaris")
var supportedArchs = strings.Fields("386 amd64")

func init() {
	sort.Strings(supportedOSs)
	sort.Strings(supportedArchs)
}

var excludeSuffixes []string
var excludeFolders []string

func computeExcludeSuffixes() {
	for _, os := range supportedOSs {
		if os == *targetOS {
			continue
		}
		excludeSuffixes = append(excludeSuffixes, "_" + os)
		excludeFolders = append(excludeFolders, os)
		for _, arch := range supportedArchs {
			excludeSuffixes = append(excludeSuffixes, "_" + os + "_" + arch)
			excludeFolders = append(excludeFolders, os + "_" + arch)
		}
	}<commit_msg>Still more panic()->fail() conversion. I think that's all of them...<commit_after>// 24 september 2014

package main

import (
	"flag"
	"runtime"
	"os"
	"path/filepath"
	"strings"
	"sort"
)

var targetOS = flag.String("os", runtime.GOOS, "select target OS; list for a list of supported OSs")
var targetArch = flag.String("arch", runtime.GOARCH, "select target architecture; list for a list of supported architectures")

func targetName() string {
	pwd, err := os.Getwd()
	if err != nil {
		fail("Error getting current working directory to determine target name: %v", err)
	}
	target := filepath.Base(pwd)
	if *targetOS == "windows" {
		target += ".exe"
	}
	return target
}

var supportedOSs = strings.Fields("windows darwin linux freebsd openbsd netbsd dragonfly solaris")
var supportedArchs = strings.Fields("386 amd64")

func init() {
	sort.Strings(supportedOSs)
	sort.Strings(supportedArchs)
}

var excludeSuffixes []string
var excludeFolders []string

func computeExcludeSuffixes() {
	for _, os := range supportedOSs {
		if os == *targetOS {
			continue
		}
		excludeSuffixes = append(excludeSuffixes, "_" + os)
		excludeFolders = append(excludeFolders, os)
		for _, arch := range supportedArchs {
			excludeSuffixes = append(excludeSuffixes, "_" + os + "_" + arch)
			excludeFolders = append(excludeFolders, os + "_" + arch)
		}
	}
{'fraction_non_alphanumeric': 0.12519561815336464, 'fraction_numerical': 0.008607198748043818, 'mean_word_length': 4.428874734607219, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3125230', 'n_tokens_mistral': 930, 'n_tokens_neox': 853, 'n_words': 244}