internal/download: remove Verify

This commit is contained in:
Felix Lange 2025-05-15 22:01:56 +02:00
parent a6baf48021
commit 5f4917b7e5

View file

@ -127,16 +127,6 @@ func (db *ChecksumDB) Files() iter.Seq[string] {
} }
} }
// Verify checks whether the given file is valid according to the checksum database.
func (db *ChecksumDB) Verify(path string) error {
basename := filepath.Base(path)
hash := db.findHash(basename)
if hash == "" {
return fmt.Errorf("no known hash for file %q", basename)
}
return verifyHash(path, hash)
}
// VerifyAll downloads all files and checks that they match the checksum given in // VerifyAll downloads all files and checks that they match the checksum given in
// the database. This task can be used to sanity-check new checksums. // the database. This task can be used to sanity-check new checksums.
func (db *ChecksumDB) VerifyAll() { func (db *ChecksumDB) VerifyAll() {