build: remove unused funcs

This commit is contained in:
cuiweixie 2025-08-11 21:52:49 +08:00
parent 92106a6b17
commit b04885108b
2 changed files with 0 additions and 21 deletions

View file

@ -343,10 +343,6 @@ func downloadSpecTestFixtures(csdb *download.ChecksumDB, cachedir string) string
return filepath.Join(cachedir, base) return filepath.Join(cachedir, base)
} }
// doCheckTidy assets that the Go modules files are tidied already.
func doCheckTidy() {
}
// doCheckGenerate ensures that re-generating generated files does not cause // doCheckGenerate ensures that re-generating generated files does not cause
// any mutations in the source file tree. // any mutations in the source file tree.
func doCheckGenerate() { func doCheckGenerate() {

View file

@ -34,23 +34,6 @@ func FileExist(path string) bool {
return true return true
} }
// HashFiles iterates the provided set of files, computing the hash of each.
func HashFiles(files []string) (map[string][32]byte, error) {
res := make(map[string][32]byte)
for _, filePath := range files {
f, err := os.OpenFile(filePath, os.O_RDONLY, 0666)
if err != nil {
return nil, err
}
hasher := sha256.New()
if _, err := io.Copy(hasher, f); err != nil {
return nil, err
}
res[filePath] = [32]byte(hasher.Sum(nil))
}
return res, nil
}
// HashFolder iterates all files under the given directory, computing the hash // HashFolder iterates all files under the given directory, computing the hash
// of each. // of each.
func HashFolder(folder string, exlude []string) (map[string][32]byte, error) { func HashFolder(folder string, exlude []string) (map[string][32]byte, error) {