From c5328ee78865eb1392ffa97ba2f1912685b07043 Mon Sep 17 00:00:00 2001 From: Draylar Date: Tue, 20 Oct 2020 11:40:11 -0500 Subject: [PATCH] Update core/mod.go Co-authored-by: comp500 --- core/mod.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mod.go b/core/mod.go index 5760cb9..4a15943 100644 --- a/core/mod.go +++ b/core/mod.go @@ -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