From d2e0af8aca8990607dcafd65a39af9c4feff37e8 Mon Sep 17 00:00:00 2001 From: Philipp Mieden Date: Tue, 21 May 2019 10:05:01 +0200 Subject: [PATCH] using fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) --- repo/history.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repo/history.go b/repo/history.go index 9a23859..1e358de 100644 --- a/repo/history.go +++ b/repo/history.go @@ -1,14 +1,14 @@ package repo import ( + "errors" + "fmt" "io/ioutil" "os" "path" "sort" "strings" "time" - "errors" - "fmt" ) const historyRepoJSONPrefix = "contentserver-repo-" @@ -63,7 +63,7 @@ func (h *history) cleanup() error { for _, f := range files { err := os.Remove(f) if err != nil { - return errors.New(fmt.Sprintf("could not remove file %s : %s", f, err.Error())) + return fmt.Errorf("could not remove file %s : %s", f, err.Error()) } }