func IsHeader(s string) bool {
	return headerRegexp.MatchString(s)
}
Does the input string look like it is a header file?
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)$`)
)