func PrefixDirs(paths []string, dir string) []string {
	output := []string{}
	for _, p := range paths {
		output = append(output, filepath.Join(dir, p))
	}
	return output
}
Prefixes a directory to every file in a list
The returned file paths are the shortest paths (../ removed)
package utils
import (
	"fmt"
	"os"
	"path/filepath"
	"regexp"
	"sort"
	"strings"
)
var (
	headerRegexp        = regexp.MustCompile(`\.(h|hpp|inc)$`)
	compileSourceRegexp = regexp.MustCompile(`\.(c|s|cpp|cc|S)$`)
)
func IsHeader(s string) bool {
	return headerRegexp.MatchString(s)
}
func IsNotHeader(s string) bool {
	return !headerRegexp.MatchString(s)
}
func IsCompilableSource(s string) bool {
	return compileSourceRegexp.MatchString(s)
}
func IsNotCompilableSource(s string) bool {
	return !compileSourceRegexp.MatchString(s)
}
func PrefixAll(list []string, prefix string) []string {
	output := []string{}
	for _, s := range list {
		output = append(output, prefix+s)
	}
	return output
}