From 2bf42f11cde4463c6fc4b6a343e89ebb6ae47901 Mon Sep 17 00:00:00 2001 From: Benoit Gagnon Date: Thu, 24 Oct 2019 11:05:54 -0400 Subject: [PATCH] use fmt.Errorf(...) instead of errors.new(fmt.Sprintf(...)) Signed-off-by: Benoit Gagnon --- pkg/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/git.go b/pkg/git.go index 00ac845..54d74e5 100644 --- a/pkg/git.go +++ b/pkg/git.go @@ -53,7 +53,7 @@ func downloadGitHubArchive(filepath string, url string) error { } color.Cyan("GET %s %d", url, resp.StatusCode) if resp.StatusCode != 200 { - return errors.New(fmt.Sprintf("unexpected status code %d", resp.StatusCode)) + return fmt.Errorf("unexpected status code %d", resp.StatusCode) } defer resp.Body.Close()