From ad0d49dcb2177cc451a5a9d49891111923f7277c Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Fri, 7 Mar 2014 10:20:39 +0100 Subject: [PATCH] Use fmt.Errorf() instead of errors.New(fmt.Sprintf()) --- client/error.go | 2 +- worker/error.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/error.go b/client/error.go index b6c61ea..5db98af 100644 --- a/client/error.go +++ b/client/error.go @@ -22,7 +22,7 @@ func getError(data []byte) (err error) { err = fmt.Errorf("Not a error data: %V", data) return } - err = errors.New(fmt.Sprintf("%s: %s", rel[0], rel[1])) + err = fmt.Errorf("%s: %s", rel[0], rel[1]) return } diff --git a/worker/error.go b/worker/error.go index c25a6d3..28464c0 100644 --- a/worker/error.go +++ b/worker/error.go @@ -21,7 +21,7 @@ func getError(data []byte) (err error) { err = fmt.Errorf("Not a error data: %V", data) return } - err = errors.New(fmt.Sprintf("%s: %s", rel[0], rel[1])) + err = fmt.Errorf("%s: %s", rel[0], rel[1]) return }