Update core/mod.go

Co-authored-by: comp500 <comp500@users.noreply.github.com>
This commit is contained in:
Draylar 2020-10-20 11:40:11 -05:00 committed by GitHub
parent aaf6ae77ac
commit c5328ee788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,7 +150,7 @@ func (m Mod) DownloadFile(dest io.Writer) error {
// Check if the hash of the downloaded file matches the expected hash.
if calculatedHash != m.Download.Hash {
return errors.New(fmt.Sprintf("Hash of downloaded file does not match with expected hash!\n download hash: %s\n expected hash: %s\n", calculatedHash, m.Download.Hash))
return fmt.Errorf("Hash of downloaded file does not match with expected hash!\n download hash: %s\n expected hash: %s\n", calculatedHash, m.Download.Hash)
}
return nil